@orq-ai/node 3.14.7 → 4.0.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/bin/mcp-server.js +210 -213
- package/bin/mcp-server.js.map +38 -38
- package/docs/sdks/agents/README.md +8 -4
- package/docs/sdks/budgets/README.md +4 -2
- package/docs/sdks/tools/README.md +4 -2
- package/examples/package-lock.json +5 -6
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/server.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.js +10 -10
- package/models/operations/duplicatetool.js +10 -10
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getalltools.js +10 -10
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +10 -10
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +10 -10
- package/package.json +4 -4
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +10 -10
- package/src/models/operations/duplicatetool.ts +10 -10
- 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/getalltools.ts +10 -10
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +10 -10
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +10 -10
- package/packages/orq-rc/FUNCTIONS.md +0 -103
- package/packages/orq-rc/README.md +0 -909
- package/packages/orq-rc/RUNTIMES.md +0 -48
- package/packages/orq-rc/docs/sdks/agents/README.md +0 -1319
- package/packages/orq-rc/docs/sdks/budgets/README.md +0 -401
- package/packages/orq-rc/docs/sdks/chunking/README.md +0 -95
- package/packages/orq-rc/docs/sdks/contacts/README.md +0 -450
- package/packages/orq-rc/docs/sdks/datasets/README.md +0 -836
- package/packages/orq-rc/docs/sdks/deployments/README.md +0 -312
- package/packages/orq-rc/docs/sdks/evals/README.md +0 -339
- package/packages/orq-rc/docs/sdks/feedback/README.md +0 -89
- package/packages/orq-rc/docs/sdks/files/README.md +0 -301
- package/packages/orq-rc/docs/sdks/knowledge/README.md +0 -1489
- package/packages/orq-rc/docs/sdks/memorystores/README.md +0 -1172
- package/packages/orq-rc/docs/sdks/metrics/README.md +0 -83
- package/packages/orq-rc/docs/sdks/models/README.md +0 -76
- package/packages/orq-rc/docs/sdks/prompts/README.md +0 -591
- package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +0 -77
- package/packages/orq-rc/docs/sdks/tools/README.md +0 -490
- package/packages/orq-rc/examples/README.md +0 -31
- package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
- package/packages/orq-rc/examples/package-lock.json +0 -627
- package/packages/orq-rc/examples/package.json +0 -18
- package/packages/orq-rc/jsr.json +0 -28
- package/packages/orq-rc/package-lock.json +0 -3071
- package/packages/orq-rc/package.json +0 -43
- package/packages/orq-rc/src/core.ts +0 -13
- package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -172
- package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -176
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -167
- package/packages/orq-rc/src/funcs/agentsList.ts +0 -167
- package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
- package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -175
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
- package/packages/orq-rc/src/funcs/agentsRun.ts +0 -163
- package/packages/orq-rc/src/funcs/agentsStream.ts +0 -190
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -188
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -176
- package/packages/orq-rc/src/funcs/budgetsCreate.ts +0 -160
- package/packages/orq-rc/src/funcs/budgetsDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/budgetsGet.ts +0 -166
- package/packages/orq-rc/src/funcs/budgetsList.ts +0 -170
- package/packages/orq-rc/src/funcs/budgetsUpdate.ts +0 -167
- package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
- 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/datasetsCreateDatapoint.ts +0 -171
- package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
- package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
- package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
- package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
- package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
- package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
- package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
- package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
- package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
- package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
- package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
- 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/knowledgeCreate.ts +0 -158
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
- package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
- package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
- package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
- package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
- package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
- package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
- package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
- package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
- package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
- package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
- package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
- package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
- package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
- package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
- package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -171
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -175
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -184
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -179
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -181
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -176
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -178
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -173
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -179
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -174
- 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/funcs/toolsCreate.ts +0 -163
- package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
- package/packages/orq-rc/src/funcs/toolsDuplicate.ts +0 -175
- package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
- package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
- package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
- package/packages/orq-rc/src/hooks/global.ts +0 -44
- package/packages/orq-rc/src/hooks/hooks.ts +0 -132
- package/packages/orq-rc/src/hooks/index.ts +0 -6
- package/packages/orq-rc/src/hooks/registration.ts +0 -15
- package/packages/orq-rc/src/hooks/types.ts +0 -112
- package/packages/orq-rc/src/index.ts +0 -9
- package/packages/orq-rc/src/lib/base64.ts +0 -37
- package/packages/orq-rc/src/lib/config.ts +0 -74
- package/packages/orq-rc/src/lib/dlv.ts +0 -53
- package/packages/orq-rc/src/lib/encodings.ts +0 -483
- package/packages/orq-rc/src/lib/env.ts +0 -89
- package/packages/orq-rc/src/lib/event-streams.ts +0 -135
- package/packages/orq-rc/src/lib/files.ts +0 -82
- package/packages/orq-rc/src/lib/http.ts +0 -323
- package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
- package/packages/orq-rc/src/lib/logger.ts +0 -9
- package/packages/orq-rc/src/lib/matchers.ts +0 -345
- package/packages/orq-rc/src/lib/primitives.ts +0 -150
- package/packages/orq-rc/src/lib/retries.ts +0 -218
- package/packages/orq-rc/src/lib/schemas.ts +0 -91
- package/packages/orq-rc/src/lib/sdks.ts +0 -407
- package/packages/orq-rc/src/lib/security.ts +0 -264
- package/packages/orq-rc/src/lib/url.ts +0 -33
- package/packages/orq-rc/src/mcp-server/cli/start/command.ts +0 -111
- package/packages/orq-rc/src/mcp-server/cli/start/impl.ts +0 -136
- 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 -259
- package/packages/orq-rc/src/mcp-server/shared.ts +0 -74
- package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/budgetsDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/budgetsUpdate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/chunkingParse.ts +0 -37
- 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/deploymentsMetricsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/deploymentsStream.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/evalsAll.ts +0 -35
- 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/evalsUpdate.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/knowledgeCreate.ts +0 -35
- 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/knowledgeDeleteChunks.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/knowledgeGetChunksCount.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/knowledgeListChunksPaginated.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/memoryStoresCreate.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +0 -40
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +0 -40
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +0 -37
- 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/toolsCreate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools.ts +0 -129
- package/packages/orq-rc/src/models/components/deployments.ts +0 -8147
- 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 -40
- package/packages/orq-rc/src/models/errors/createagent.ts +0 -80
- package/packages/orq-rc/src/models/errors/createeval.ts +0 -80
- package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -80
- package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -91
- package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -80
- package/packages/orq-rc/src/models/errors/duplicatetool.ts +0 -91
- package/packages/orq-rc/src/models/errors/getagent.ts +0 -80
- package/packages/orq-rc/src/models/errors/getagenttask.ts +0 -80
- package/packages/orq-rc/src/models/errors/getevals.ts +0 -80
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -80
- package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -90
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
- package/packages/orq-rc/src/models/errors/index.ts +0 -29
- package/packages/orq-rc/src/models/errors/listagenttasks.ts +0 -80
- 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/streamagent.ts +0 -80
- package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -80
- package/packages/orq-rc/src/models/errors/updateagent.ts +0 -80
- package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -83
- package/packages/orq-rc/src/models/errors/updateeval.ts +0 -80
- package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -80
- package/packages/orq-rc/src/models/errors/updatetool.ts +0 -91
- package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -78
- package/packages/orq-rc/src/models/operations/createagent.ts +0 -3104
- package/packages/orq-rc/src/models/operations/createbudget.ts +0 -745
- 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 -302
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -6943
- package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -852
- package/packages/orq-rc/src/models/operations/createeval.ts +0 -9341
- package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
- package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -1850
- package/packages/orq-rc/src/models/operations/creatememory.ts +0 -274
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -287
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -2032
- package/packages/orq-rc/src/models/operations/createprompt.ts +0 -7812
- package/packages/orq-rc/src/models/operations/createtool.ts +0 -4077
- package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -78
- package/packages/orq-rc/src/models/operations/deletebudget.ts +0 -69
- package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -96
- package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -243
- package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -69
- package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -87
- package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -78
- 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/deletememory.ts +0 -87
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -98
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -78
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
- package/packages/orq-rc/src/models/operations/deletetool.ts +0 -75
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -6547
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -10532
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1266
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -2606
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -10655
- package/packages/orq-rc/src/models/operations/duplicatetool.ts +0 -2349
- 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/getagent.ts +0 -957
- package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -259
- package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -318
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -338
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -1277
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2572
- package/packages/orq-rc/src/models/operations/getalltools.ts +0 -2308
- package/packages/orq-rc/src/models/operations/getbudget.ts +0 -441
- package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -230
- package/packages/orq-rc/src/models/operations/getevals.ts +0 -7486
- package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -315
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -1292
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -2437
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2444
- package/packages/orq-rc/src/models/operations/index.ts +0 -102
- package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -1569
- package/packages/orq-rc/src/models/operations/listactions.ts +0 -526
- package/packages/orq-rc/src/models/operations/listagents.ts +0 -1077
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -1106
- package/packages/orq-rc/src/models/operations/listbudgets.ts +0 -617
- package/packages/orq-rc/src/models/operations/listchunks.ts +0 -494
- package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -507
- package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -500
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -4086
- package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -406
- package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -454
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -1303
- package/packages/orq-rc/src/models/operations/listmodels.ts +0 -273
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2580
- package/packages/orq-rc/src/models/operations/parse.ts +0 -1295
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
- package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -426
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -210
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -3853
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -291
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -273
- package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -201
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -220
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -1160
- package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -2333
- package/packages/orq-rc/src/models/operations/runagent.ts +0 -4342
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -3573
- package/packages/orq-rc/src/models/operations/streamagent.ts +0 -1367
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -4355
- package/packages/orq-rc/src/models/operations/updateagent.ts +0 -3321
- package/packages/orq-rc/src/models/operations/updatebudget.ts +0 -628
- 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 -6934
- package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -386
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -345
- package/packages/orq-rc/src/models/operations/updateeval.ts +0 -9704
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -2341
- package/packages/orq-rc/src/models/operations/updatememory.ts +0 -283
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -296
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -1363
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -8176
- package/packages/orq-rc/src/models/operations/updatetool.ts +0 -4288
- package/packages/orq-rc/src/sdk/agents.ts +0 -238
- package/packages/orq-rc/src/sdk/budgets.ts +0 -99
- package/packages/orq-rc/src/sdk/chunking.ts +0 -27
- 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 -69
- 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 -309
- package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
- package/packages/orq-rc/src/sdk/metrics.ts +0 -27
- package/packages/orq-rc/src/sdk/models.ts +0 -25
- package/packages/orq-rc/src/sdk/prompts.ts +0 -126
- package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
- package/packages/orq-rc/src/sdk/sdk.ts +0 -97
- package/packages/orq-rc/src/sdk/tools.ts +0 -117
- package/packages/orq-rc/src/types/async.ts +0 -68
- package/packages/orq-rc/src/types/blobs.ts +0 -32
- package/packages/orq-rc/src/types/constdatetime.ts +0 -15
- package/packages/orq-rc/src/types/enums.ts +0 -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
|
@@ -1,1295 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
14
|
-
*/
|
|
15
|
-
export const ParseChunkingRequestChunkingRequestReturnType = {
|
|
16
|
-
Chunks: "chunks",
|
|
17
|
-
Texts: "texts",
|
|
18
|
-
} as const;
|
|
19
|
-
/**
|
|
20
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
21
|
-
*/
|
|
22
|
-
export type ParseChunkingRequestChunkingRequestReturnType = ClosedEnum<
|
|
23
|
-
typeof ParseChunkingRequestChunkingRequestReturnType
|
|
24
|
-
>;
|
|
25
|
-
|
|
26
|
-
export const AgenticChunker = {
|
|
27
|
-
Agentic: "agentic",
|
|
28
|
-
} as const;
|
|
29
|
-
export type AgenticChunker = ClosedEnum<typeof AgenticChunker>;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Agentic LLM-powered chunker that uses AI to determine optimal split points. Best for complex documents requiring intelligent segmentation.
|
|
33
|
-
*/
|
|
34
|
-
export type AgenticChunkerStrategy = {
|
|
35
|
-
/**
|
|
36
|
-
* The text content to be chunked
|
|
37
|
-
*/
|
|
38
|
-
text: string;
|
|
39
|
-
/**
|
|
40
|
-
* Whether to include metadata for each chunk
|
|
41
|
-
*/
|
|
42
|
-
metadata?: boolean | undefined;
|
|
43
|
-
/**
|
|
44
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
45
|
-
*/
|
|
46
|
-
returnType?: ParseChunkingRequestChunkingRequestReturnType | undefined;
|
|
47
|
-
strategy: AgenticChunker;
|
|
48
|
-
/**
|
|
49
|
-
* Chat model to use for chunking. (Available models)[https://docs.orq.ai/docs/proxy#chat-models]
|
|
50
|
-
*/
|
|
51
|
-
model: string;
|
|
52
|
-
/**
|
|
53
|
-
* Maximum tokens per chunk
|
|
54
|
-
*/
|
|
55
|
-
chunkSize?: number | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Size of candidate splits for LLM evaluation
|
|
58
|
-
*/
|
|
59
|
-
candidateSize?: number | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* Minimum characters allowed per chunk
|
|
62
|
-
*/
|
|
63
|
-
minCharactersPerChunk?: number | undefined;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
68
|
-
*/
|
|
69
|
-
export const ParseChunkingRequestChunkingReturnType = {
|
|
70
|
-
Chunks: "chunks",
|
|
71
|
-
Texts: "texts",
|
|
72
|
-
} as const;
|
|
73
|
-
/**
|
|
74
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
75
|
-
*/
|
|
76
|
-
export type ParseChunkingRequestChunkingReturnType = ClosedEnum<
|
|
77
|
-
typeof ParseChunkingRequestChunkingReturnType
|
|
78
|
-
>;
|
|
79
|
-
|
|
80
|
-
export const SemanticChunker = {
|
|
81
|
-
Semantic: "semantic",
|
|
82
|
-
} as const;
|
|
83
|
-
export type SemanticChunker = ClosedEnum<typeof SemanticChunker>;
|
|
84
|
-
|
|
85
|
-
export const Threshold2 = {
|
|
86
|
-
Auto: "auto",
|
|
87
|
-
} as const;
|
|
88
|
-
export type Threshold2 = ClosedEnum<typeof Threshold2>;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Similarity threshold for grouping (0-1) or "auto" for automatic detection
|
|
92
|
-
*/
|
|
93
|
-
export type Threshold = number | Threshold2;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Chunking mode: window-based or sentence-based similarity
|
|
97
|
-
*/
|
|
98
|
-
export const Mode = {
|
|
99
|
-
Window: "window",
|
|
100
|
-
Sentence: "sentence",
|
|
101
|
-
} as const;
|
|
102
|
-
/**
|
|
103
|
-
* Chunking mode: window-based or sentence-based similarity
|
|
104
|
-
*/
|
|
105
|
-
export type Mode = ClosedEnum<typeof Mode>;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Groups semantically similar sentences using embeddings. Excellent for maintaining topic coherence and context within chunks.
|
|
109
|
-
*/
|
|
110
|
-
export type SemanticChunkerStrategy = {
|
|
111
|
-
/**
|
|
112
|
-
* The text content to be chunked
|
|
113
|
-
*/
|
|
114
|
-
text: string;
|
|
115
|
-
/**
|
|
116
|
-
* Whether to include metadata for each chunk
|
|
117
|
-
*/
|
|
118
|
-
metadata?: boolean | undefined;
|
|
119
|
-
/**
|
|
120
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
121
|
-
*/
|
|
122
|
-
returnType?: ParseChunkingRequestChunkingReturnType | undefined;
|
|
123
|
-
strategy: SemanticChunker;
|
|
124
|
-
/**
|
|
125
|
-
* Maximum tokens per chunk
|
|
126
|
-
*/
|
|
127
|
-
chunkSize?: number | undefined;
|
|
128
|
-
/**
|
|
129
|
-
* Similarity threshold for grouping (0-1) or "auto" for automatic detection
|
|
130
|
-
*/
|
|
131
|
-
threshold?: number | Threshold2 | undefined;
|
|
132
|
-
/**
|
|
133
|
-
* Embedding model to use for semantic similarity. (Available embedding models)[https://docs.orq.ai/docs/proxy#embedding-models]
|
|
134
|
-
*/
|
|
135
|
-
embeddingModel: string;
|
|
136
|
-
/**
|
|
137
|
-
* Chunking mode: window-based or sentence-based similarity
|
|
138
|
-
*/
|
|
139
|
-
mode?: Mode | undefined;
|
|
140
|
-
/**
|
|
141
|
-
* Window size for similarity comparison
|
|
142
|
-
*/
|
|
143
|
-
similarityWindow?: number | undefined;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
148
|
-
*/
|
|
149
|
-
export const ParseChunkingRequestReturnType = {
|
|
150
|
-
Chunks: "chunks",
|
|
151
|
-
Texts: "texts",
|
|
152
|
-
} as const;
|
|
153
|
-
/**
|
|
154
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
155
|
-
*/
|
|
156
|
-
export type ParseChunkingRequestReturnType = ClosedEnum<
|
|
157
|
-
typeof ParseChunkingRequestReturnType
|
|
158
|
-
>;
|
|
159
|
-
|
|
160
|
-
export const RecursiveChunker = {
|
|
161
|
-
Recursive: "recursive",
|
|
162
|
-
} as const;
|
|
163
|
-
export type RecursiveChunker = ClosedEnum<typeof RecursiveChunker>;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Recursively splits text using a hierarchy of separators (paragraphs, sentences, words). Versatile general-purpose chunker that preserves document structure.
|
|
167
|
-
*/
|
|
168
|
-
export type RecursiveChunkerStrategy = {
|
|
169
|
-
/**
|
|
170
|
-
* The text content to be chunked
|
|
171
|
-
*/
|
|
172
|
-
text: string;
|
|
173
|
-
/**
|
|
174
|
-
* Whether to include metadata for each chunk
|
|
175
|
-
*/
|
|
176
|
-
metadata?: boolean | undefined;
|
|
177
|
-
/**
|
|
178
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
179
|
-
*/
|
|
180
|
-
returnType?: ParseChunkingRequestReturnType | undefined;
|
|
181
|
-
strategy: RecursiveChunker;
|
|
182
|
-
/**
|
|
183
|
-
* Maximum tokens per chunk
|
|
184
|
-
*/
|
|
185
|
-
chunkSize?: number | undefined;
|
|
186
|
-
/**
|
|
187
|
-
* Hierarchy of separators to use for splitting
|
|
188
|
-
*/
|
|
189
|
-
separators?: Array<string> | undefined;
|
|
190
|
-
/**
|
|
191
|
-
* Minimum characters allowed per chunk
|
|
192
|
-
*/
|
|
193
|
-
minCharactersPerChunk?: number | undefined;
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
198
|
-
*/
|
|
199
|
-
export const ChunkingRequestReturnType = {
|
|
200
|
-
Chunks: "chunks",
|
|
201
|
-
Texts: "texts",
|
|
202
|
-
} as const;
|
|
203
|
-
/**
|
|
204
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
205
|
-
*/
|
|
206
|
-
export type ChunkingRequestReturnType = ClosedEnum<
|
|
207
|
-
typeof ChunkingRequestReturnType
|
|
208
|
-
>;
|
|
209
|
-
|
|
210
|
-
export const SentenceChunker = {
|
|
211
|
-
Sentence: "sentence",
|
|
212
|
-
} as const;
|
|
213
|
-
export type SentenceChunker = ClosedEnum<typeof SentenceChunker>;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Splits text at sentence boundaries while respecting token limits. Ideal for maintaining semantic coherence and readability.
|
|
217
|
-
*/
|
|
218
|
-
export type SentenceChunkerStrategy = {
|
|
219
|
-
/**
|
|
220
|
-
* The text content to be chunked
|
|
221
|
-
*/
|
|
222
|
-
text: string;
|
|
223
|
-
/**
|
|
224
|
-
* Whether to include metadata for each chunk
|
|
225
|
-
*/
|
|
226
|
-
metadata?: boolean | undefined;
|
|
227
|
-
/**
|
|
228
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
229
|
-
*/
|
|
230
|
-
returnType?: ChunkingRequestReturnType | undefined;
|
|
231
|
-
strategy: SentenceChunker;
|
|
232
|
-
/**
|
|
233
|
-
* Maximum tokens per chunk
|
|
234
|
-
*/
|
|
235
|
-
chunkSize?: number | undefined;
|
|
236
|
-
/**
|
|
237
|
-
* Number of overlapping tokens between chunks
|
|
238
|
-
*/
|
|
239
|
-
chunkOverlap?: number | undefined;
|
|
240
|
-
/**
|
|
241
|
-
* Minimum number of sentences per chunk
|
|
242
|
-
*/
|
|
243
|
-
minSentencesPerChunk?: number | undefined;
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
248
|
-
*/
|
|
249
|
-
export const ReturnTypeT = {
|
|
250
|
-
Chunks: "chunks",
|
|
251
|
-
Texts: "texts",
|
|
252
|
-
} as const;
|
|
253
|
-
/**
|
|
254
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
255
|
-
*/
|
|
256
|
-
export type ReturnTypeT = ClosedEnum<typeof ReturnTypeT>;
|
|
257
|
-
|
|
258
|
-
export const TokenChunker = {
|
|
259
|
-
Token: "token",
|
|
260
|
-
} as const;
|
|
261
|
-
export type TokenChunker = ClosedEnum<typeof TokenChunker>;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Splits text based on token count. Best for ensuring chunks fit within LLM context windows and maintaining consistent chunk sizes for embedding models.
|
|
265
|
-
*/
|
|
266
|
-
export type TokenChunkerStrategy = {
|
|
267
|
-
/**
|
|
268
|
-
* The text content to be chunked
|
|
269
|
-
*/
|
|
270
|
-
text: string;
|
|
271
|
-
/**
|
|
272
|
-
* Whether to include metadata for each chunk
|
|
273
|
-
*/
|
|
274
|
-
metadata?: boolean | undefined;
|
|
275
|
-
/**
|
|
276
|
-
* Return format: chunks (with metadata) or texts (plain strings)
|
|
277
|
-
*/
|
|
278
|
-
returnType?: ReturnTypeT | undefined;
|
|
279
|
-
strategy: TokenChunker;
|
|
280
|
-
/**
|
|
281
|
-
* Maximum tokens per chunk
|
|
282
|
-
*/
|
|
283
|
-
chunkSize?: number | undefined;
|
|
284
|
-
/**
|
|
285
|
-
* Number of tokens to overlap between chunks
|
|
286
|
-
*/
|
|
287
|
-
chunkOverlap?: number | undefined;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Request payload for text chunking with strategy-specific configuration
|
|
292
|
-
*/
|
|
293
|
-
export type ParseChunkingRequest =
|
|
294
|
-
| SemanticChunkerStrategy
|
|
295
|
-
| AgenticChunkerStrategy
|
|
296
|
-
| TokenChunkerStrategy
|
|
297
|
-
| SentenceChunkerStrategy
|
|
298
|
-
| RecursiveChunkerStrategy;
|
|
299
|
-
|
|
300
|
-
export type ParseMetadata = {
|
|
301
|
-
startIndex: number | null;
|
|
302
|
-
endIndex: number | null;
|
|
303
|
-
tokenCount: number | null;
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
export type Chunks = {
|
|
307
|
-
/**
|
|
308
|
-
* The text content of the chunk
|
|
309
|
-
*/
|
|
310
|
-
text: string;
|
|
311
|
-
/**
|
|
312
|
-
* The position index of this chunk in the sequence
|
|
313
|
-
*/
|
|
314
|
-
index: number;
|
|
315
|
-
metadata?: ParseMetadata | undefined;
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Text successfully chunked
|
|
320
|
-
*/
|
|
321
|
-
export type ParseResponseBody = {
|
|
322
|
-
chunks: Array<Chunks>;
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
/** @internal */
|
|
326
|
-
export const ParseChunkingRequestChunkingRequestReturnType$inboundSchema:
|
|
327
|
-
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType> = z
|
|
328
|
-
.nativeEnum(ParseChunkingRequestChunkingRequestReturnType);
|
|
329
|
-
|
|
330
|
-
/** @internal */
|
|
331
|
-
export const ParseChunkingRequestChunkingRequestReturnType$outboundSchema:
|
|
332
|
-
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType> =
|
|
333
|
-
ParseChunkingRequestChunkingRequestReturnType$inboundSchema;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* @internal
|
|
337
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
338
|
-
*/
|
|
339
|
-
export namespace ParseChunkingRequestChunkingRequestReturnType$ {
|
|
340
|
-
/** @deprecated use `ParseChunkingRequestChunkingRequestReturnType$inboundSchema` instead. */
|
|
341
|
-
export const inboundSchema =
|
|
342
|
-
ParseChunkingRequestChunkingRequestReturnType$inboundSchema;
|
|
343
|
-
/** @deprecated use `ParseChunkingRequestChunkingRequestReturnType$outboundSchema` instead. */
|
|
344
|
-
export const outboundSchema =
|
|
345
|
-
ParseChunkingRequestChunkingRequestReturnType$outboundSchema;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
/** @internal */
|
|
349
|
-
export const AgenticChunker$inboundSchema: z.ZodNativeEnum<
|
|
350
|
-
typeof AgenticChunker
|
|
351
|
-
> = z.nativeEnum(AgenticChunker);
|
|
352
|
-
|
|
353
|
-
/** @internal */
|
|
354
|
-
export const AgenticChunker$outboundSchema: z.ZodNativeEnum<
|
|
355
|
-
typeof AgenticChunker
|
|
356
|
-
> = AgenticChunker$inboundSchema;
|
|
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
|
-
export namespace AgenticChunker$ {
|
|
363
|
-
/** @deprecated use `AgenticChunker$inboundSchema` instead. */
|
|
364
|
-
export const inboundSchema = AgenticChunker$inboundSchema;
|
|
365
|
-
/** @deprecated use `AgenticChunker$outboundSchema` instead. */
|
|
366
|
-
export const outboundSchema = AgenticChunker$outboundSchema;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/** @internal */
|
|
370
|
-
export const AgenticChunkerStrategy$inboundSchema: z.ZodType<
|
|
371
|
-
AgenticChunkerStrategy,
|
|
372
|
-
z.ZodTypeDef,
|
|
373
|
-
unknown
|
|
374
|
-
> = z.object({
|
|
375
|
-
text: z.string(),
|
|
376
|
-
metadata: z.boolean().default(true),
|
|
377
|
-
return_type: ParseChunkingRequestChunkingRequestReturnType$inboundSchema
|
|
378
|
-
.default("chunks"),
|
|
379
|
-
strategy: AgenticChunker$inboundSchema,
|
|
380
|
-
model: z.string(),
|
|
381
|
-
chunk_size: z.number().int().default(1024),
|
|
382
|
-
candidate_size: z.number().int().default(128),
|
|
383
|
-
min_characters_per_chunk: z.number().int().default(24),
|
|
384
|
-
}).transform((v) => {
|
|
385
|
-
return remap$(v, {
|
|
386
|
-
"return_type": "returnType",
|
|
387
|
-
"chunk_size": "chunkSize",
|
|
388
|
-
"candidate_size": "candidateSize",
|
|
389
|
-
"min_characters_per_chunk": "minCharactersPerChunk",
|
|
390
|
-
});
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
/** @internal */
|
|
394
|
-
export type AgenticChunkerStrategy$Outbound = {
|
|
395
|
-
text: string;
|
|
396
|
-
metadata: boolean;
|
|
397
|
-
return_type: string;
|
|
398
|
-
strategy: string;
|
|
399
|
-
model: string;
|
|
400
|
-
chunk_size: number;
|
|
401
|
-
candidate_size: number;
|
|
402
|
-
min_characters_per_chunk: number;
|
|
403
|
-
};
|
|
404
|
-
|
|
405
|
-
/** @internal */
|
|
406
|
-
export const AgenticChunkerStrategy$outboundSchema: z.ZodType<
|
|
407
|
-
AgenticChunkerStrategy$Outbound,
|
|
408
|
-
z.ZodTypeDef,
|
|
409
|
-
AgenticChunkerStrategy
|
|
410
|
-
> = z.object({
|
|
411
|
-
text: z.string(),
|
|
412
|
-
metadata: z.boolean().default(true),
|
|
413
|
-
returnType: ParseChunkingRequestChunkingRequestReturnType$outboundSchema
|
|
414
|
-
.default("chunks"),
|
|
415
|
-
strategy: AgenticChunker$outboundSchema,
|
|
416
|
-
model: z.string(),
|
|
417
|
-
chunkSize: z.number().int().default(1024),
|
|
418
|
-
candidateSize: z.number().int().default(128),
|
|
419
|
-
minCharactersPerChunk: z.number().int().default(24),
|
|
420
|
-
}).transform((v) => {
|
|
421
|
-
return remap$(v, {
|
|
422
|
-
returnType: "return_type",
|
|
423
|
-
chunkSize: "chunk_size",
|
|
424
|
-
candidateSize: "candidate_size",
|
|
425
|
-
minCharactersPerChunk: "min_characters_per_chunk",
|
|
426
|
-
});
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* @internal
|
|
431
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
432
|
-
*/
|
|
433
|
-
export namespace AgenticChunkerStrategy$ {
|
|
434
|
-
/** @deprecated use `AgenticChunkerStrategy$inboundSchema` instead. */
|
|
435
|
-
export const inboundSchema = AgenticChunkerStrategy$inboundSchema;
|
|
436
|
-
/** @deprecated use `AgenticChunkerStrategy$outboundSchema` instead. */
|
|
437
|
-
export const outboundSchema = AgenticChunkerStrategy$outboundSchema;
|
|
438
|
-
/** @deprecated use `AgenticChunkerStrategy$Outbound` instead. */
|
|
439
|
-
export type Outbound = AgenticChunkerStrategy$Outbound;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
export function agenticChunkerStrategyToJSON(
|
|
443
|
-
agenticChunkerStrategy: AgenticChunkerStrategy,
|
|
444
|
-
): string {
|
|
445
|
-
return JSON.stringify(
|
|
446
|
-
AgenticChunkerStrategy$outboundSchema.parse(agenticChunkerStrategy),
|
|
447
|
-
);
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
export function agenticChunkerStrategyFromJSON(
|
|
451
|
-
jsonString: string,
|
|
452
|
-
): SafeParseResult<AgenticChunkerStrategy, SDKValidationError> {
|
|
453
|
-
return safeParse(
|
|
454
|
-
jsonString,
|
|
455
|
-
(x) => AgenticChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
|
|
456
|
-
`Failed to parse 'AgenticChunkerStrategy' from JSON`,
|
|
457
|
-
);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
/** @internal */
|
|
461
|
-
export const ParseChunkingRequestChunkingReturnType$inboundSchema:
|
|
462
|
-
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType> = z.nativeEnum(
|
|
463
|
-
ParseChunkingRequestChunkingReturnType,
|
|
464
|
-
);
|
|
465
|
-
|
|
466
|
-
/** @internal */
|
|
467
|
-
export const ParseChunkingRequestChunkingReturnType$outboundSchema:
|
|
468
|
-
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType> =
|
|
469
|
-
ParseChunkingRequestChunkingReturnType$inboundSchema;
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* @internal
|
|
473
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
474
|
-
*/
|
|
475
|
-
export namespace ParseChunkingRequestChunkingReturnType$ {
|
|
476
|
-
/** @deprecated use `ParseChunkingRequestChunkingReturnType$inboundSchema` instead. */
|
|
477
|
-
export const inboundSchema =
|
|
478
|
-
ParseChunkingRequestChunkingReturnType$inboundSchema;
|
|
479
|
-
/** @deprecated use `ParseChunkingRequestChunkingReturnType$outboundSchema` instead. */
|
|
480
|
-
export const outboundSchema =
|
|
481
|
-
ParseChunkingRequestChunkingReturnType$outboundSchema;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
/** @internal */
|
|
485
|
-
export const SemanticChunker$inboundSchema: z.ZodNativeEnum<
|
|
486
|
-
typeof SemanticChunker
|
|
487
|
-
> = z.nativeEnum(SemanticChunker);
|
|
488
|
-
|
|
489
|
-
/** @internal */
|
|
490
|
-
export const SemanticChunker$outboundSchema: z.ZodNativeEnum<
|
|
491
|
-
typeof SemanticChunker
|
|
492
|
-
> = SemanticChunker$inboundSchema;
|
|
493
|
-
|
|
494
|
-
/**
|
|
495
|
-
* @internal
|
|
496
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
497
|
-
*/
|
|
498
|
-
export namespace SemanticChunker$ {
|
|
499
|
-
/** @deprecated use `SemanticChunker$inboundSchema` instead. */
|
|
500
|
-
export const inboundSchema = SemanticChunker$inboundSchema;
|
|
501
|
-
/** @deprecated use `SemanticChunker$outboundSchema` instead. */
|
|
502
|
-
export const outboundSchema = SemanticChunker$outboundSchema;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
/** @internal */
|
|
506
|
-
export const Threshold2$inboundSchema: z.ZodNativeEnum<typeof Threshold2> = z
|
|
507
|
-
.nativeEnum(Threshold2);
|
|
508
|
-
|
|
509
|
-
/** @internal */
|
|
510
|
-
export const Threshold2$outboundSchema: z.ZodNativeEnum<typeof Threshold2> =
|
|
511
|
-
Threshold2$inboundSchema;
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
* @internal
|
|
515
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
516
|
-
*/
|
|
517
|
-
export namespace Threshold2$ {
|
|
518
|
-
/** @deprecated use `Threshold2$inboundSchema` instead. */
|
|
519
|
-
export const inboundSchema = Threshold2$inboundSchema;
|
|
520
|
-
/** @deprecated use `Threshold2$outboundSchema` instead. */
|
|
521
|
-
export const outboundSchema = Threshold2$outboundSchema;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
/** @internal */
|
|
525
|
-
export const Threshold$inboundSchema: z.ZodType<
|
|
526
|
-
Threshold,
|
|
527
|
-
z.ZodTypeDef,
|
|
528
|
-
unknown
|
|
529
|
-
> = z.union([z.number(), Threshold2$inboundSchema]);
|
|
530
|
-
|
|
531
|
-
/** @internal */
|
|
532
|
-
export type Threshold$Outbound = number | string;
|
|
533
|
-
|
|
534
|
-
/** @internal */
|
|
535
|
-
export const Threshold$outboundSchema: z.ZodType<
|
|
536
|
-
Threshold$Outbound,
|
|
537
|
-
z.ZodTypeDef,
|
|
538
|
-
Threshold
|
|
539
|
-
> = z.union([z.number(), Threshold2$outboundSchema]);
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* @internal
|
|
543
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
544
|
-
*/
|
|
545
|
-
export namespace Threshold$ {
|
|
546
|
-
/** @deprecated use `Threshold$inboundSchema` instead. */
|
|
547
|
-
export const inboundSchema = Threshold$inboundSchema;
|
|
548
|
-
/** @deprecated use `Threshold$outboundSchema` instead. */
|
|
549
|
-
export const outboundSchema = Threshold$outboundSchema;
|
|
550
|
-
/** @deprecated use `Threshold$Outbound` instead. */
|
|
551
|
-
export type Outbound = Threshold$Outbound;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
export function thresholdToJSON(threshold: Threshold): string {
|
|
555
|
-
return JSON.stringify(Threshold$outboundSchema.parse(threshold));
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
export function thresholdFromJSON(
|
|
559
|
-
jsonString: string,
|
|
560
|
-
): SafeParseResult<Threshold, SDKValidationError> {
|
|
561
|
-
return safeParse(
|
|
562
|
-
jsonString,
|
|
563
|
-
(x) => Threshold$inboundSchema.parse(JSON.parse(x)),
|
|
564
|
-
`Failed to parse 'Threshold' from JSON`,
|
|
565
|
-
);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
/** @internal */
|
|
569
|
-
export const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode> = z.nativeEnum(
|
|
570
|
-
Mode,
|
|
571
|
-
);
|
|
572
|
-
|
|
573
|
-
/** @internal */
|
|
574
|
-
export const Mode$outboundSchema: z.ZodNativeEnum<typeof Mode> =
|
|
575
|
-
Mode$inboundSchema;
|
|
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
|
-
export namespace Mode$ {
|
|
582
|
-
/** @deprecated use `Mode$inboundSchema` instead. */
|
|
583
|
-
export const inboundSchema = Mode$inboundSchema;
|
|
584
|
-
/** @deprecated use `Mode$outboundSchema` instead. */
|
|
585
|
-
export const outboundSchema = Mode$outboundSchema;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/** @internal */
|
|
589
|
-
export const SemanticChunkerStrategy$inboundSchema: z.ZodType<
|
|
590
|
-
SemanticChunkerStrategy,
|
|
591
|
-
z.ZodTypeDef,
|
|
592
|
-
unknown
|
|
593
|
-
> = z.object({
|
|
594
|
-
text: z.string(),
|
|
595
|
-
metadata: z.boolean().default(true),
|
|
596
|
-
return_type: ParseChunkingRequestChunkingReturnType$inboundSchema.default(
|
|
597
|
-
"chunks",
|
|
598
|
-
),
|
|
599
|
-
strategy: SemanticChunker$inboundSchema,
|
|
600
|
-
chunk_size: z.number().int().default(512),
|
|
601
|
-
threshold: z.union([z.number(), Threshold2$inboundSchema]).optional(),
|
|
602
|
-
embedding_model: z.string(),
|
|
603
|
-
mode: Mode$inboundSchema.default("window"),
|
|
604
|
-
similarity_window: z.number().int().default(1),
|
|
605
|
-
}).transform((v) => {
|
|
606
|
-
return remap$(v, {
|
|
607
|
-
"return_type": "returnType",
|
|
608
|
-
"chunk_size": "chunkSize",
|
|
609
|
-
"embedding_model": "embeddingModel",
|
|
610
|
-
"similarity_window": "similarityWindow",
|
|
611
|
-
});
|
|
612
|
-
});
|
|
613
|
-
|
|
614
|
-
/** @internal */
|
|
615
|
-
export type SemanticChunkerStrategy$Outbound = {
|
|
616
|
-
text: string;
|
|
617
|
-
metadata: boolean;
|
|
618
|
-
return_type: string;
|
|
619
|
-
strategy: string;
|
|
620
|
-
chunk_size: number;
|
|
621
|
-
threshold?: number | string | undefined;
|
|
622
|
-
embedding_model: string;
|
|
623
|
-
mode: string;
|
|
624
|
-
similarity_window: number;
|
|
625
|
-
};
|
|
626
|
-
|
|
627
|
-
/** @internal */
|
|
628
|
-
export const SemanticChunkerStrategy$outboundSchema: z.ZodType<
|
|
629
|
-
SemanticChunkerStrategy$Outbound,
|
|
630
|
-
z.ZodTypeDef,
|
|
631
|
-
SemanticChunkerStrategy
|
|
632
|
-
> = z.object({
|
|
633
|
-
text: z.string(),
|
|
634
|
-
metadata: z.boolean().default(true),
|
|
635
|
-
returnType: ParseChunkingRequestChunkingReturnType$outboundSchema.default(
|
|
636
|
-
"chunks",
|
|
637
|
-
),
|
|
638
|
-
strategy: SemanticChunker$outboundSchema,
|
|
639
|
-
chunkSize: z.number().int().default(512),
|
|
640
|
-
threshold: z.union([z.number(), Threshold2$outboundSchema]).optional(),
|
|
641
|
-
embeddingModel: z.string(),
|
|
642
|
-
mode: Mode$outboundSchema.default("window"),
|
|
643
|
-
similarityWindow: z.number().int().default(1),
|
|
644
|
-
}).transform((v) => {
|
|
645
|
-
return remap$(v, {
|
|
646
|
-
returnType: "return_type",
|
|
647
|
-
chunkSize: "chunk_size",
|
|
648
|
-
embeddingModel: "embedding_model",
|
|
649
|
-
similarityWindow: "similarity_window",
|
|
650
|
-
});
|
|
651
|
-
});
|
|
652
|
-
|
|
653
|
-
/**
|
|
654
|
-
* @internal
|
|
655
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
656
|
-
*/
|
|
657
|
-
export namespace SemanticChunkerStrategy$ {
|
|
658
|
-
/** @deprecated use `SemanticChunkerStrategy$inboundSchema` instead. */
|
|
659
|
-
export const inboundSchema = SemanticChunkerStrategy$inboundSchema;
|
|
660
|
-
/** @deprecated use `SemanticChunkerStrategy$outboundSchema` instead. */
|
|
661
|
-
export const outboundSchema = SemanticChunkerStrategy$outboundSchema;
|
|
662
|
-
/** @deprecated use `SemanticChunkerStrategy$Outbound` instead. */
|
|
663
|
-
export type Outbound = SemanticChunkerStrategy$Outbound;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
|
-
export function semanticChunkerStrategyToJSON(
|
|
667
|
-
semanticChunkerStrategy: SemanticChunkerStrategy,
|
|
668
|
-
): string {
|
|
669
|
-
return JSON.stringify(
|
|
670
|
-
SemanticChunkerStrategy$outboundSchema.parse(semanticChunkerStrategy),
|
|
671
|
-
);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
export function semanticChunkerStrategyFromJSON(
|
|
675
|
-
jsonString: string,
|
|
676
|
-
): SafeParseResult<SemanticChunkerStrategy, SDKValidationError> {
|
|
677
|
-
return safeParse(
|
|
678
|
-
jsonString,
|
|
679
|
-
(x) => SemanticChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
|
|
680
|
-
`Failed to parse 'SemanticChunkerStrategy' from JSON`,
|
|
681
|
-
);
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
/** @internal */
|
|
685
|
-
export const ParseChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<
|
|
686
|
-
typeof ParseChunkingRequestReturnType
|
|
687
|
-
> = z.nativeEnum(ParseChunkingRequestReturnType);
|
|
688
|
-
|
|
689
|
-
/** @internal */
|
|
690
|
-
export const ParseChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<
|
|
691
|
-
typeof ParseChunkingRequestReturnType
|
|
692
|
-
> = ParseChunkingRequestReturnType$inboundSchema;
|
|
693
|
-
|
|
694
|
-
/**
|
|
695
|
-
* @internal
|
|
696
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
697
|
-
*/
|
|
698
|
-
export namespace ParseChunkingRequestReturnType$ {
|
|
699
|
-
/** @deprecated use `ParseChunkingRequestReturnType$inboundSchema` instead. */
|
|
700
|
-
export const inboundSchema = ParseChunkingRequestReturnType$inboundSchema;
|
|
701
|
-
/** @deprecated use `ParseChunkingRequestReturnType$outboundSchema` instead. */
|
|
702
|
-
export const outboundSchema = ParseChunkingRequestReturnType$outboundSchema;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
/** @internal */
|
|
706
|
-
export const RecursiveChunker$inboundSchema: z.ZodNativeEnum<
|
|
707
|
-
typeof RecursiveChunker
|
|
708
|
-
> = z.nativeEnum(RecursiveChunker);
|
|
709
|
-
|
|
710
|
-
/** @internal */
|
|
711
|
-
export const RecursiveChunker$outboundSchema: z.ZodNativeEnum<
|
|
712
|
-
typeof RecursiveChunker
|
|
713
|
-
> = RecursiveChunker$inboundSchema;
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* @internal
|
|
717
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
718
|
-
*/
|
|
719
|
-
export namespace RecursiveChunker$ {
|
|
720
|
-
/** @deprecated use `RecursiveChunker$inboundSchema` instead. */
|
|
721
|
-
export const inboundSchema = RecursiveChunker$inboundSchema;
|
|
722
|
-
/** @deprecated use `RecursiveChunker$outboundSchema` instead. */
|
|
723
|
-
export const outboundSchema = RecursiveChunker$outboundSchema;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
/** @internal */
|
|
727
|
-
export const RecursiveChunkerStrategy$inboundSchema: z.ZodType<
|
|
728
|
-
RecursiveChunkerStrategy,
|
|
729
|
-
z.ZodTypeDef,
|
|
730
|
-
unknown
|
|
731
|
-
> = z.object({
|
|
732
|
-
text: z.string(),
|
|
733
|
-
metadata: z.boolean().default(true),
|
|
734
|
-
return_type: ParseChunkingRequestReturnType$inboundSchema.default("chunks"),
|
|
735
|
-
strategy: RecursiveChunker$inboundSchema,
|
|
736
|
-
chunk_size: z.number().int().default(512),
|
|
737
|
-
separators: z.array(z.string()).optional(),
|
|
738
|
-
min_characters_per_chunk: z.number().int().default(24),
|
|
739
|
-
}).transform((v) => {
|
|
740
|
-
return remap$(v, {
|
|
741
|
-
"return_type": "returnType",
|
|
742
|
-
"chunk_size": "chunkSize",
|
|
743
|
-
"min_characters_per_chunk": "minCharactersPerChunk",
|
|
744
|
-
});
|
|
745
|
-
});
|
|
746
|
-
|
|
747
|
-
/** @internal */
|
|
748
|
-
export type RecursiveChunkerStrategy$Outbound = {
|
|
749
|
-
text: string;
|
|
750
|
-
metadata: boolean;
|
|
751
|
-
return_type: string;
|
|
752
|
-
strategy: string;
|
|
753
|
-
chunk_size: number;
|
|
754
|
-
separators?: Array<string> | undefined;
|
|
755
|
-
min_characters_per_chunk: number;
|
|
756
|
-
};
|
|
757
|
-
|
|
758
|
-
/** @internal */
|
|
759
|
-
export const RecursiveChunkerStrategy$outboundSchema: z.ZodType<
|
|
760
|
-
RecursiveChunkerStrategy$Outbound,
|
|
761
|
-
z.ZodTypeDef,
|
|
762
|
-
RecursiveChunkerStrategy
|
|
763
|
-
> = z.object({
|
|
764
|
-
text: z.string(),
|
|
765
|
-
metadata: z.boolean().default(true),
|
|
766
|
-
returnType: ParseChunkingRequestReturnType$outboundSchema.default("chunks"),
|
|
767
|
-
strategy: RecursiveChunker$outboundSchema,
|
|
768
|
-
chunkSize: z.number().int().default(512),
|
|
769
|
-
separators: z.array(z.string()).optional(),
|
|
770
|
-
minCharactersPerChunk: z.number().int().default(24),
|
|
771
|
-
}).transform((v) => {
|
|
772
|
-
return remap$(v, {
|
|
773
|
-
returnType: "return_type",
|
|
774
|
-
chunkSize: "chunk_size",
|
|
775
|
-
minCharactersPerChunk: "min_characters_per_chunk",
|
|
776
|
-
});
|
|
777
|
-
});
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
* @internal
|
|
781
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
782
|
-
*/
|
|
783
|
-
export namespace RecursiveChunkerStrategy$ {
|
|
784
|
-
/** @deprecated use `RecursiveChunkerStrategy$inboundSchema` instead. */
|
|
785
|
-
export const inboundSchema = RecursiveChunkerStrategy$inboundSchema;
|
|
786
|
-
/** @deprecated use `RecursiveChunkerStrategy$outboundSchema` instead. */
|
|
787
|
-
export const outboundSchema = RecursiveChunkerStrategy$outboundSchema;
|
|
788
|
-
/** @deprecated use `RecursiveChunkerStrategy$Outbound` instead. */
|
|
789
|
-
export type Outbound = RecursiveChunkerStrategy$Outbound;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
export function recursiveChunkerStrategyToJSON(
|
|
793
|
-
recursiveChunkerStrategy: RecursiveChunkerStrategy,
|
|
794
|
-
): string {
|
|
795
|
-
return JSON.stringify(
|
|
796
|
-
RecursiveChunkerStrategy$outboundSchema.parse(recursiveChunkerStrategy),
|
|
797
|
-
);
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
export function recursiveChunkerStrategyFromJSON(
|
|
801
|
-
jsonString: string,
|
|
802
|
-
): SafeParseResult<RecursiveChunkerStrategy, SDKValidationError> {
|
|
803
|
-
return safeParse(
|
|
804
|
-
jsonString,
|
|
805
|
-
(x) => RecursiveChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
|
|
806
|
-
`Failed to parse 'RecursiveChunkerStrategy' from JSON`,
|
|
807
|
-
);
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
/** @internal */
|
|
811
|
-
export const ChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<
|
|
812
|
-
typeof ChunkingRequestReturnType
|
|
813
|
-
> = z.nativeEnum(ChunkingRequestReturnType);
|
|
814
|
-
|
|
815
|
-
/** @internal */
|
|
816
|
-
export const ChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<
|
|
817
|
-
typeof ChunkingRequestReturnType
|
|
818
|
-
> = ChunkingRequestReturnType$inboundSchema;
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* @internal
|
|
822
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
823
|
-
*/
|
|
824
|
-
export namespace ChunkingRequestReturnType$ {
|
|
825
|
-
/** @deprecated use `ChunkingRequestReturnType$inboundSchema` instead. */
|
|
826
|
-
export const inboundSchema = ChunkingRequestReturnType$inboundSchema;
|
|
827
|
-
/** @deprecated use `ChunkingRequestReturnType$outboundSchema` instead. */
|
|
828
|
-
export const outboundSchema = ChunkingRequestReturnType$outboundSchema;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
/** @internal */
|
|
832
|
-
export const SentenceChunker$inboundSchema: z.ZodNativeEnum<
|
|
833
|
-
typeof SentenceChunker
|
|
834
|
-
> = z.nativeEnum(SentenceChunker);
|
|
835
|
-
|
|
836
|
-
/** @internal */
|
|
837
|
-
export const SentenceChunker$outboundSchema: z.ZodNativeEnum<
|
|
838
|
-
typeof SentenceChunker
|
|
839
|
-
> = SentenceChunker$inboundSchema;
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* @internal
|
|
843
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
844
|
-
*/
|
|
845
|
-
export namespace SentenceChunker$ {
|
|
846
|
-
/** @deprecated use `SentenceChunker$inboundSchema` instead. */
|
|
847
|
-
export const inboundSchema = SentenceChunker$inboundSchema;
|
|
848
|
-
/** @deprecated use `SentenceChunker$outboundSchema` instead. */
|
|
849
|
-
export const outboundSchema = SentenceChunker$outboundSchema;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
/** @internal */
|
|
853
|
-
export const SentenceChunkerStrategy$inboundSchema: z.ZodType<
|
|
854
|
-
SentenceChunkerStrategy,
|
|
855
|
-
z.ZodTypeDef,
|
|
856
|
-
unknown
|
|
857
|
-
> = z.object({
|
|
858
|
-
text: z.string(),
|
|
859
|
-
metadata: z.boolean().default(true),
|
|
860
|
-
return_type: ChunkingRequestReturnType$inboundSchema.default("chunks"),
|
|
861
|
-
strategy: SentenceChunker$inboundSchema,
|
|
862
|
-
chunk_size: z.number().int().default(512),
|
|
863
|
-
chunk_overlap: z.number().int().default(0),
|
|
864
|
-
min_sentences_per_chunk: z.number().int().default(1),
|
|
865
|
-
}).transform((v) => {
|
|
866
|
-
return remap$(v, {
|
|
867
|
-
"return_type": "returnType",
|
|
868
|
-
"chunk_size": "chunkSize",
|
|
869
|
-
"chunk_overlap": "chunkOverlap",
|
|
870
|
-
"min_sentences_per_chunk": "minSentencesPerChunk",
|
|
871
|
-
});
|
|
872
|
-
});
|
|
873
|
-
|
|
874
|
-
/** @internal */
|
|
875
|
-
export type SentenceChunkerStrategy$Outbound = {
|
|
876
|
-
text: string;
|
|
877
|
-
metadata: boolean;
|
|
878
|
-
return_type: string;
|
|
879
|
-
strategy: string;
|
|
880
|
-
chunk_size: number;
|
|
881
|
-
chunk_overlap: number;
|
|
882
|
-
min_sentences_per_chunk: number;
|
|
883
|
-
};
|
|
884
|
-
|
|
885
|
-
/** @internal */
|
|
886
|
-
export const SentenceChunkerStrategy$outboundSchema: z.ZodType<
|
|
887
|
-
SentenceChunkerStrategy$Outbound,
|
|
888
|
-
z.ZodTypeDef,
|
|
889
|
-
SentenceChunkerStrategy
|
|
890
|
-
> = z.object({
|
|
891
|
-
text: z.string(),
|
|
892
|
-
metadata: z.boolean().default(true),
|
|
893
|
-
returnType: ChunkingRequestReturnType$outboundSchema.default("chunks"),
|
|
894
|
-
strategy: SentenceChunker$outboundSchema,
|
|
895
|
-
chunkSize: z.number().int().default(512),
|
|
896
|
-
chunkOverlap: z.number().int().default(0),
|
|
897
|
-
minSentencesPerChunk: z.number().int().default(1),
|
|
898
|
-
}).transform((v) => {
|
|
899
|
-
return remap$(v, {
|
|
900
|
-
returnType: "return_type",
|
|
901
|
-
chunkSize: "chunk_size",
|
|
902
|
-
chunkOverlap: "chunk_overlap",
|
|
903
|
-
minSentencesPerChunk: "min_sentences_per_chunk",
|
|
904
|
-
});
|
|
905
|
-
});
|
|
906
|
-
|
|
907
|
-
/**
|
|
908
|
-
* @internal
|
|
909
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
910
|
-
*/
|
|
911
|
-
export namespace SentenceChunkerStrategy$ {
|
|
912
|
-
/** @deprecated use `SentenceChunkerStrategy$inboundSchema` instead. */
|
|
913
|
-
export const inboundSchema = SentenceChunkerStrategy$inboundSchema;
|
|
914
|
-
/** @deprecated use `SentenceChunkerStrategy$outboundSchema` instead. */
|
|
915
|
-
export const outboundSchema = SentenceChunkerStrategy$outboundSchema;
|
|
916
|
-
/** @deprecated use `SentenceChunkerStrategy$Outbound` instead. */
|
|
917
|
-
export type Outbound = SentenceChunkerStrategy$Outbound;
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
export function sentenceChunkerStrategyToJSON(
|
|
921
|
-
sentenceChunkerStrategy: SentenceChunkerStrategy,
|
|
922
|
-
): string {
|
|
923
|
-
return JSON.stringify(
|
|
924
|
-
SentenceChunkerStrategy$outboundSchema.parse(sentenceChunkerStrategy),
|
|
925
|
-
);
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
export function sentenceChunkerStrategyFromJSON(
|
|
929
|
-
jsonString: string,
|
|
930
|
-
): SafeParseResult<SentenceChunkerStrategy, SDKValidationError> {
|
|
931
|
-
return safeParse(
|
|
932
|
-
jsonString,
|
|
933
|
-
(x) => SentenceChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
|
|
934
|
-
`Failed to parse 'SentenceChunkerStrategy' from JSON`,
|
|
935
|
-
);
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
/** @internal */
|
|
939
|
-
export const ReturnTypeT$inboundSchema: z.ZodNativeEnum<typeof ReturnTypeT> = z
|
|
940
|
-
.nativeEnum(ReturnTypeT);
|
|
941
|
-
|
|
942
|
-
/** @internal */
|
|
943
|
-
export const ReturnTypeT$outboundSchema: z.ZodNativeEnum<typeof ReturnTypeT> =
|
|
944
|
-
ReturnTypeT$inboundSchema;
|
|
945
|
-
|
|
946
|
-
/**
|
|
947
|
-
* @internal
|
|
948
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
949
|
-
*/
|
|
950
|
-
export namespace ReturnTypeT$ {
|
|
951
|
-
/** @deprecated use `ReturnTypeT$inboundSchema` instead. */
|
|
952
|
-
export const inboundSchema = ReturnTypeT$inboundSchema;
|
|
953
|
-
/** @deprecated use `ReturnTypeT$outboundSchema` instead. */
|
|
954
|
-
export const outboundSchema = ReturnTypeT$outboundSchema;
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
/** @internal */
|
|
958
|
-
export const TokenChunker$inboundSchema: z.ZodNativeEnum<typeof TokenChunker> =
|
|
959
|
-
z.nativeEnum(TokenChunker);
|
|
960
|
-
|
|
961
|
-
/** @internal */
|
|
962
|
-
export const TokenChunker$outboundSchema: z.ZodNativeEnum<typeof TokenChunker> =
|
|
963
|
-
TokenChunker$inboundSchema;
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* @internal
|
|
967
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
968
|
-
*/
|
|
969
|
-
export namespace TokenChunker$ {
|
|
970
|
-
/** @deprecated use `TokenChunker$inboundSchema` instead. */
|
|
971
|
-
export const inboundSchema = TokenChunker$inboundSchema;
|
|
972
|
-
/** @deprecated use `TokenChunker$outboundSchema` instead. */
|
|
973
|
-
export const outboundSchema = TokenChunker$outboundSchema;
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
/** @internal */
|
|
977
|
-
export const TokenChunkerStrategy$inboundSchema: z.ZodType<
|
|
978
|
-
TokenChunkerStrategy,
|
|
979
|
-
z.ZodTypeDef,
|
|
980
|
-
unknown
|
|
981
|
-
> = z.object({
|
|
982
|
-
text: z.string(),
|
|
983
|
-
metadata: z.boolean().default(true),
|
|
984
|
-
return_type: ReturnTypeT$inboundSchema.default("chunks"),
|
|
985
|
-
strategy: TokenChunker$inboundSchema,
|
|
986
|
-
chunk_size: z.number().int().default(512),
|
|
987
|
-
chunk_overlap: z.number().int().default(0),
|
|
988
|
-
}).transform((v) => {
|
|
989
|
-
return remap$(v, {
|
|
990
|
-
"return_type": "returnType",
|
|
991
|
-
"chunk_size": "chunkSize",
|
|
992
|
-
"chunk_overlap": "chunkOverlap",
|
|
993
|
-
});
|
|
994
|
-
});
|
|
995
|
-
|
|
996
|
-
/** @internal */
|
|
997
|
-
export type TokenChunkerStrategy$Outbound = {
|
|
998
|
-
text: string;
|
|
999
|
-
metadata: boolean;
|
|
1000
|
-
return_type: string;
|
|
1001
|
-
strategy: string;
|
|
1002
|
-
chunk_size: number;
|
|
1003
|
-
chunk_overlap: number;
|
|
1004
|
-
};
|
|
1005
|
-
|
|
1006
|
-
/** @internal */
|
|
1007
|
-
export const TokenChunkerStrategy$outboundSchema: z.ZodType<
|
|
1008
|
-
TokenChunkerStrategy$Outbound,
|
|
1009
|
-
z.ZodTypeDef,
|
|
1010
|
-
TokenChunkerStrategy
|
|
1011
|
-
> = z.object({
|
|
1012
|
-
text: z.string(),
|
|
1013
|
-
metadata: z.boolean().default(true),
|
|
1014
|
-
returnType: ReturnTypeT$outboundSchema.default("chunks"),
|
|
1015
|
-
strategy: TokenChunker$outboundSchema,
|
|
1016
|
-
chunkSize: z.number().int().default(512),
|
|
1017
|
-
chunkOverlap: z.number().int().default(0),
|
|
1018
|
-
}).transform((v) => {
|
|
1019
|
-
return remap$(v, {
|
|
1020
|
-
returnType: "return_type",
|
|
1021
|
-
chunkSize: "chunk_size",
|
|
1022
|
-
chunkOverlap: "chunk_overlap",
|
|
1023
|
-
});
|
|
1024
|
-
});
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* @internal
|
|
1028
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1029
|
-
*/
|
|
1030
|
-
export namespace TokenChunkerStrategy$ {
|
|
1031
|
-
/** @deprecated use `TokenChunkerStrategy$inboundSchema` instead. */
|
|
1032
|
-
export const inboundSchema = TokenChunkerStrategy$inboundSchema;
|
|
1033
|
-
/** @deprecated use `TokenChunkerStrategy$outboundSchema` instead. */
|
|
1034
|
-
export const outboundSchema = TokenChunkerStrategy$outboundSchema;
|
|
1035
|
-
/** @deprecated use `TokenChunkerStrategy$Outbound` instead. */
|
|
1036
|
-
export type Outbound = TokenChunkerStrategy$Outbound;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
export function tokenChunkerStrategyToJSON(
|
|
1040
|
-
tokenChunkerStrategy: TokenChunkerStrategy,
|
|
1041
|
-
): string {
|
|
1042
|
-
return JSON.stringify(
|
|
1043
|
-
TokenChunkerStrategy$outboundSchema.parse(tokenChunkerStrategy),
|
|
1044
|
-
);
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
export function tokenChunkerStrategyFromJSON(
|
|
1048
|
-
jsonString: string,
|
|
1049
|
-
): SafeParseResult<TokenChunkerStrategy, SDKValidationError> {
|
|
1050
|
-
return safeParse(
|
|
1051
|
-
jsonString,
|
|
1052
|
-
(x) => TokenChunkerStrategy$inboundSchema.parse(JSON.parse(x)),
|
|
1053
|
-
`Failed to parse 'TokenChunkerStrategy' from JSON`,
|
|
1054
|
-
);
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
/** @internal */
|
|
1058
|
-
export const ParseChunkingRequest$inboundSchema: z.ZodType<
|
|
1059
|
-
ParseChunkingRequest,
|
|
1060
|
-
z.ZodTypeDef,
|
|
1061
|
-
unknown
|
|
1062
|
-
> = z.union([
|
|
1063
|
-
z.lazy(() => SemanticChunkerStrategy$inboundSchema),
|
|
1064
|
-
z.lazy(() => AgenticChunkerStrategy$inboundSchema),
|
|
1065
|
-
z.lazy(() => TokenChunkerStrategy$inboundSchema),
|
|
1066
|
-
z.lazy(() => SentenceChunkerStrategy$inboundSchema),
|
|
1067
|
-
z.lazy(() => RecursiveChunkerStrategy$inboundSchema),
|
|
1068
|
-
]);
|
|
1069
|
-
|
|
1070
|
-
/** @internal */
|
|
1071
|
-
export type ParseChunkingRequest$Outbound =
|
|
1072
|
-
| SemanticChunkerStrategy$Outbound
|
|
1073
|
-
| AgenticChunkerStrategy$Outbound
|
|
1074
|
-
| TokenChunkerStrategy$Outbound
|
|
1075
|
-
| SentenceChunkerStrategy$Outbound
|
|
1076
|
-
| RecursiveChunkerStrategy$Outbound;
|
|
1077
|
-
|
|
1078
|
-
/** @internal */
|
|
1079
|
-
export const ParseChunkingRequest$outboundSchema: z.ZodType<
|
|
1080
|
-
ParseChunkingRequest$Outbound,
|
|
1081
|
-
z.ZodTypeDef,
|
|
1082
|
-
ParseChunkingRequest
|
|
1083
|
-
> = z.union([
|
|
1084
|
-
z.lazy(() => SemanticChunkerStrategy$outboundSchema),
|
|
1085
|
-
z.lazy(() => AgenticChunkerStrategy$outboundSchema),
|
|
1086
|
-
z.lazy(() => TokenChunkerStrategy$outboundSchema),
|
|
1087
|
-
z.lazy(() => SentenceChunkerStrategy$outboundSchema),
|
|
1088
|
-
z.lazy(() => RecursiveChunkerStrategy$outboundSchema),
|
|
1089
|
-
]);
|
|
1090
|
-
|
|
1091
|
-
/**
|
|
1092
|
-
* @internal
|
|
1093
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1094
|
-
*/
|
|
1095
|
-
export namespace ParseChunkingRequest$ {
|
|
1096
|
-
/** @deprecated use `ParseChunkingRequest$inboundSchema` instead. */
|
|
1097
|
-
export const inboundSchema = ParseChunkingRequest$inboundSchema;
|
|
1098
|
-
/** @deprecated use `ParseChunkingRequest$outboundSchema` instead. */
|
|
1099
|
-
export const outboundSchema = ParseChunkingRequest$outboundSchema;
|
|
1100
|
-
/** @deprecated use `ParseChunkingRequest$Outbound` instead. */
|
|
1101
|
-
export type Outbound = ParseChunkingRequest$Outbound;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
export function parseChunkingRequestToJSON(
|
|
1105
|
-
parseChunkingRequest: ParseChunkingRequest,
|
|
1106
|
-
): string {
|
|
1107
|
-
return JSON.stringify(
|
|
1108
|
-
ParseChunkingRequest$outboundSchema.parse(parseChunkingRequest),
|
|
1109
|
-
);
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
export function parseChunkingRequestFromJSON(
|
|
1113
|
-
jsonString: string,
|
|
1114
|
-
): SafeParseResult<ParseChunkingRequest, SDKValidationError> {
|
|
1115
|
-
return safeParse(
|
|
1116
|
-
jsonString,
|
|
1117
|
-
(x) => ParseChunkingRequest$inboundSchema.parse(JSON.parse(x)),
|
|
1118
|
-
`Failed to parse 'ParseChunkingRequest' from JSON`,
|
|
1119
|
-
);
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
/** @internal */
|
|
1123
|
-
export const ParseMetadata$inboundSchema: z.ZodType<
|
|
1124
|
-
ParseMetadata,
|
|
1125
|
-
z.ZodTypeDef,
|
|
1126
|
-
unknown
|
|
1127
|
-
> = z.object({
|
|
1128
|
-
start_index: z.nullable(z.number()),
|
|
1129
|
-
end_index: z.nullable(z.number()),
|
|
1130
|
-
token_count: z.nullable(z.number()),
|
|
1131
|
-
}).transform((v) => {
|
|
1132
|
-
return remap$(v, {
|
|
1133
|
-
"start_index": "startIndex",
|
|
1134
|
-
"end_index": "endIndex",
|
|
1135
|
-
"token_count": "tokenCount",
|
|
1136
|
-
});
|
|
1137
|
-
});
|
|
1138
|
-
|
|
1139
|
-
/** @internal */
|
|
1140
|
-
export type ParseMetadata$Outbound = {
|
|
1141
|
-
start_index: number | null;
|
|
1142
|
-
end_index: number | null;
|
|
1143
|
-
token_count: number | null;
|
|
1144
|
-
};
|
|
1145
|
-
|
|
1146
|
-
/** @internal */
|
|
1147
|
-
export const ParseMetadata$outboundSchema: z.ZodType<
|
|
1148
|
-
ParseMetadata$Outbound,
|
|
1149
|
-
z.ZodTypeDef,
|
|
1150
|
-
ParseMetadata
|
|
1151
|
-
> = z.object({
|
|
1152
|
-
startIndex: z.nullable(z.number()),
|
|
1153
|
-
endIndex: z.nullable(z.number()),
|
|
1154
|
-
tokenCount: z.nullable(z.number()),
|
|
1155
|
-
}).transform((v) => {
|
|
1156
|
-
return remap$(v, {
|
|
1157
|
-
startIndex: "start_index",
|
|
1158
|
-
endIndex: "end_index",
|
|
1159
|
-
tokenCount: "token_count",
|
|
1160
|
-
});
|
|
1161
|
-
});
|
|
1162
|
-
|
|
1163
|
-
/**
|
|
1164
|
-
* @internal
|
|
1165
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1166
|
-
*/
|
|
1167
|
-
export namespace ParseMetadata$ {
|
|
1168
|
-
/** @deprecated use `ParseMetadata$inboundSchema` instead. */
|
|
1169
|
-
export const inboundSchema = ParseMetadata$inboundSchema;
|
|
1170
|
-
/** @deprecated use `ParseMetadata$outboundSchema` instead. */
|
|
1171
|
-
export const outboundSchema = ParseMetadata$outboundSchema;
|
|
1172
|
-
/** @deprecated use `ParseMetadata$Outbound` instead. */
|
|
1173
|
-
export type Outbound = ParseMetadata$Outbound;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
export function parseMetadataToJSON(parseMetadata: ParseMetadata): string {
|
|
1177
|
-
return JSON.stringify(ParseMetadata$outboundSchema.parse(parseMetadata));
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
export function parseMetadataFromJSON(
|
|
1181
|
-
jsonString: string,
|
|
1182
|
-
): SafeParseResult<ParseMetadata, SDKValidationError> {
|
|
1183
|
-
return safeParse(
|
|
1184
|
-
jsonString,
|
|
1185
|
-
(x) => ParseMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
1186
|
-
`Failed to parse 'ParseMetadata' from JSON`,
|
|
1187
|
-
);
|
|
1188
|
-
}
|
|
1189
|
-
|
|
1190
|
-
/** @internal */
|
|
1191
|
-
export const Chunks$inboundSchema: z.ZodType<Chunks, z.ZodTypeDef, unknown> = z
|
|
1192
|
-
.object({
|
|
1193
|
-
text: z.string(),
|
|
1194
|
-
index: z.number(),
|
|
1195
|
-
metadata: z.lazy(() => ParseMetadata$inboundSchema).optional(),
|
|
1196
|
-
});
|
|
1197
|
-
|
|
1198
|
-
/** @internal */
|
|
1199
|
-
export type Chunks$Outbound = {
|
|
1200
|
-
text: string;
|
|
1201
|
-
index: number;
|
|
1202
|
-
metadata?: ParseMetadata$Outbound | undefined;
|
|
1203
|
-
};
|
|
1204
|
-
|
|
1205
|
-
/** @internal */
|
|
1206
|
-
export const Chunks$outboundSchema: z.ZodType<
|
|
1207
|
-
Chunks$Outbound,
|
|
1208
|
-
z.ZodTypeDef,
|
|
1209
|
-
Chunks
|
|
1210
|
-
> = z.object({
|
|
1211
|
-
text: z.string(),
|
|
1212
|
-
index: z.number(),
|
|
1213
|
-
metadata: z.lazy(() => ParseMetadata$outboundSchema).optional(),
|
|
1214
|
-
});
|
|
1215
|
-
|
|
1216
|
-
/**
|
|
1217
|
-
* @internal
|
|
1218
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1219
|
-
*/
|
|
1220
|
-
export namespace Chunks$ {
|
|
1221
|
-
/** @deprecated use `Chunks$inboundSchema` instead. */
|
|
1222
|
-
export const inboundSchema = Chunks$inboundSchema;
|
|
1223
|
-
/** @deprecated use `Chunks$outboundSchema` instead. */
|
|
1224
|
-
export const outboundSchema = Chunks$outboundSchema;
|
|
1225
|
-
/** @deprecated use `Chunks$Outbound` instead. */
|
|
1226
|
-
export type Outbound = Chunks$Outbound;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
export function chunksToJSON(chunks: Chunks): string {
|
|
1230
|
-
return JSON.stringify(Chunks$outboundSchema.parse(chunks));
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
export function chunksFromJSON(
|
|
1234
|
-
jsonString: string,
|
|
1235
|
-
): SafeParseResult<Chunks, SDKValidationError> {
|
|
1236
|
-
return safeParse(
|
|
1237
|
-
jsonString,
|
|
1238
|
-
(x) => Chunks$inboundSchema.parse(JSON.parse(x)),
|
|
1239
|
-
`Failed to parse 'Chunks' from JSON`,
|
|
1240
|
-
);
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
/** @internal */
|
|
1244
|
-
export const ParseResponseBody$inboundSchema: z.ZodType<
|
|
1245
|
-
ParseResponseBody,
|
|
1246
|
-
z.ZodTypeDef,
|
|
1247
|
-
unknown
|
|
1248
|
-
> = z.object({
|
|
1249
|
-
chunks: z.array(z.lazy(() => Chunks$inboundSchema)),
|
|
1250
|
-
});
|
|
1251
|
-
|
|
1252
|
-
/** @internal */
|
|
1253
|
-
export type ParseResponseBody$Outbound = {
|
|
1254
|
-
chunks: Array<Chunks$Outbound>;
|
|
1255
|
-
};
|
|
1256
|
-
|
|
1257
|
-
/** @internal */
|
|
1258
|
-
export const ParseResponseBody$outboundSchema: z.ZodType<
|
|
1259
|
-
ParseResponseBody$Outbound,
|
|
1260
|
-
z.ZodTypeDef,
|
|
1261
|
-
ParseResponseBody
|
|
1262
|
-
> = z.object({
|
|
1263
|
-
chunks: z.array(z.lazy(() => Chunks$outboundSchema)),
|
|
1264
|
-
});
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* @internal
|
|
1268
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1269
|
-
*/
|
|
1270
|
-
export namespace ParseResponseBody$ {
|
|
1271
|
-
/** @deprecated use `ParseResponseBody$inboundSchema` instead. */
|
|
1272
|
-
export const inboundSchema = ParseResponseBody$inboundSchema;
|
|
1273
|
-
/** @deprecated use `ParseResponseBody$outboundSchema` instead. */
|
|
1274
|
-
export const outboundSchema = ParseResponseBody$outboundSchema;
|
|
1275
|
-
/** @deprecated use `ParseResponseBody$Outbound` instead. */
|
|
1276
|
-
export type Outbound = ParseResponseBody$Outbound;
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
|
-
export function parseResponseBodyToJSON(
|
|
1280
|
-
parseResponseBody: ParseResponseBody,
|
|
1281
|
-
): string {
|
|
1282
|
-
return JSON.stringify(
|
|
1283
|
-
ParseResponseBody$outboundSchema.parse(parseResponseBody),
|
|
1284
|
-
);
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
export function parseResponseBodyFromJSON(
|
|
1288
|
-
jsonString: string,
|
|
1289
|
-
): SafeParseResult<ParseResponseBody, SDKValidationError> {
|
|
1290
|
-
return safeParse(
|
|
1291
|
-
jsonString,
|
|
1292
|
-
(x) => ParseResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
1293
|
-
`Failed to parse 'ParseResponseBody' from JSON`,
|
|
1294
|
-
);
|
|
1295
|
-
}
|