@orq-ai/node 4.0.5 → 4.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +214 -217
- package/bin/mcp-server.js.map +39 -39
- package/docs/sdks/agents/README.md +8 -4
- package/docs/sdks/budgets/README.md +4 -2
- package/docs/sdks/tools/README.md +2 -2
- package/examples/package-lock.json +4 -7
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/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 +12 -12
- 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 +12 -12
- 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 +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- 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 +14 -14
- package/package.json +4 -3
- 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 +12 -12
- 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 +12 -12
- 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 +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- 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 +14 -14
- package/packages/orq-rc/FUNCTIONS.md +0 -103
- package/packages/orq-rc/README.md +0 -901
- package/packages/orq-rc/RUNTIMES.md +0 -48
- package/packages/orq-rc/docs/sdks/agents/README.md +0 -1064
- package/packages/orq-rc/docs/sdks/budgets/README.md +0 -401
- package/packages/orq-rc/docs/sdks/chunking/README.md +0 -97
- 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 -1487
- package/packages/orq-rc/docs/sdks/memorystores/README.md +0 -1171
- 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/responses/README.md +0 -134
- package/packages/orq-rc/docs/sdks/tools/README.md +0 -420
- 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 -619
- 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 -3047
- package/packages/orq-rc/package.json +0 -40
- package/packages/orq-rc/src/core.ts +0 -13
- package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -174
- package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
- package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -179
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
- package/packages/orq-rc/src/funcs/agentsRun.ts +0 -165
- package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -191
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
- 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 -162
- 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 -172
- package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
- 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 -251
- 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 -40
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +0 -41
- package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +0 -41
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.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 -40
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +0 -41
- 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/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/index.ts +0 -6
- package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -6261
- package/packages/orq-rc/src/models/components/security.ts +0 -56
- package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +0 -67
- package/packages/orq-rc/src/models/errors/createeval.ts +0 -67
- package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/deletecontact.ts +0 -78
- package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -67
- package/packages/orq-rc/src/models/errors/getevals.ts +0 -67
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -67
- package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -77
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
- package/packages/orq-rc/src/models/errors/index.ts +0 -26
- package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
- package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
- package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -67
- package/packages/orq-rc/src/models/errors/retrievecontact.ts +0 -78
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
- package/packages/orq-rc/src/models/errors/streamagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/updateagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/updatecontact.ts +0 -70
- package/packages/orq-rc/src/models/errors/updateeval.ts +0 -67
- package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -67
- package/packages/orq-rc/src/models/errors/updatetool.ts +0 -78
- package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -63
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -8215
- package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -1353
- package/packages/orq-rc/src/models/operations/createbudget.ts +0 -582
- package/packages/orq-rc/src/models/operations/createchunk.ts +0 -341
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -237
- package/packages/orq-rc/src/models/operations/createdataset.ts +0 -257
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -5379
- package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -694
- package/packages/orq-rc/src/models/operations/createeval.ts +0 -6857
- package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -226
- package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -1489
- package/packages/orq-rc/src/models/operations/creatememory.ts +0 -229
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -242
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -310
- package/packages/orq-rc/src/models/operations/createprompt.ts +0 -6179
- package/packages/orq-rc/src/models/operations/createtool.ts +0 -3956
- package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -63
- package/packages/orq-rc/src/models/operations/deletebudget.ts +0 -54
- package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -81
- package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -198
- package/packages/orq-rc/src/models/operations/deletecontact.ts +0 -54
- package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -72
- package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -63
- package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -72
- package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -51
- package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -63
- package/packages/orq-rc/src/models/operations/deletememory.ts +0 -72
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -83
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -63
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -54
- package/packages/orq-rc/src/models/operations/deletetool.ts +0 -60
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -5091
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -8055
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -980
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -2054
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -8269
- package/packages/orq-rc/src/models/operations/filedelete.ts +0 -63
- package/packages/orq-rc/src/models/operations/fileget.ts +0 -181
- package/packages/orq-rc/src/models/operations/filelist.ts +0 -268
- package/packages/orq-rc/src/models/operations/fileupload.ts +0 -258
- package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -261
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -280
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -325
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2033
- package/packages/orq-rc/src/models/operations/getalltools.ts +0 -2292
- package/packages/orq-rc/src/models/operations/getbudget.ts +0 -357
- package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -185
- package/packages/orq-rc/src/models/operations/getevals.ts +0 -5543
- package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -258
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -1070
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1924
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -1942
- package/packages/orq-rc/src/models/operations/index.ts +0 -98
- package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -1893
- package/packages/orq-rc/src/models/operations/listagents.ts +0 -3614
- package/packages/orq-rc/src/models/operations/listbudgets.ts +0 -494
- package/packages/orq-rc/src/models/operations/listchunks.ts +0 -395
- package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -408
- package/packages/orq-rc/src/models/operations/listcontacts.ts +0 -413
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -3169
- package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -334
- package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -363
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -1068
- package/packages/orq-rc/src/models/operations/listmodels.ts +0 -207
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2041
- package/packages/orq-rc/src/models/operations/parse.ts +0 -1013
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -146
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3741
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +0 -180
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -2985
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -246
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -231
- package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -171
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -189
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -234
- package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -2347
- package/packages/orq-rc/src/models/operations/runagent.ts +0 -7613
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -2775
- package/packages/orq-rc/src/models/operations/streamagent.ts +0 -9732
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -15817
- package/packages/orq-rc/src/models/operations/updateagent.ts +0 -8649
- package/packages/orq-rc/src/models/operations/updatebudget.ts +0 -502
- package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -361
- package/packages/orq-rc/src/models/operations/updatecontact.ts +0 -280
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -5374
- package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -326
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -288
- package/packages/orq-rc/src/models/operations/updateeval.ts +0 -7197
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1925
- package/packages/orq-rc/src/models/operations/updatememory.ts +0 -238
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -251
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -463
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -6410
- package/packages/orq-rc/src/models/operations/updatetool.ts +0 -4279
- package/packages/orq-rc/src/sdk/agents.ts +0 -196
- 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/responses.ts +0 -29
- package/packages/orq-rc/src/sdk/sdk.ts +0 -97
- package/packages/orq-rc/src/sdk/tools.ts +0 -99
- package/packages/orq-rc/src/types/async.ts +0 -68
- package/packages/orq-rc/src/types/blobs.ts +0 -32
- package/packages/orq-rc/src/types/constdatetime.ts +0 -15
- package/packages/orq-rc/src/types/enums.ts +0 -45
- package/packages/orq-rc/src/types/fp.ts +0 -50
- package/packages/orq-rc/src/types/index.ts +0 -11
- package/packages/orq-rc/src/types/operations.ts +0 -105
- package/packages/orq-rc/src/types/rfcdate.ts +0 -54
- package/packages/orq-rc/src/types/streams.ts +0 -21
- package/packages/orq-rc/src/types/unrecognized.ts +0 -27
- package/packages/orq-rc/tsconfig.json +0 -41
|
@@ -1,901 +0,0 @@
|
|
|
1
|
-
# @orq-ai/node
|
|
2
|
-
|
|
3
|
-
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@orq-ai/node* API.
|
|
4
|
-
|
|
5
|
-
<div align="left">
|
|
6
|
-
<a href="https://www.speakeasy.com/?utm_source=@orq-ai/node&utm_campaign=typescript"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
|
|
7
|
-
<a href="https://opensource.org/licenses/MIT">
|
|
8
|
-
<img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
|
|
9
|
-
</a>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<!-- Start Summary [summary] -->
|
|
13
|
-
## Summary
|
|
14
|
-
|
|
15
|
-
orq.ai API: orq.ai API documentation
|
|
16
|
-
|
|
17
|
-
For more information about the API: [orq.ai Documentation](https://docs.orq.ai)
|
|
18
|
-
<!-- End Summary [summary] -->
|
|
19
|
-
|
|
20
|
-
<!-- Start Table of Contents [toc] -->
|
|
21
|
-
## Table of Contents
|
|
22
|
-
<!-- $toc-max-depth=2 -->
|
|
23
|
-
* [@orq-ai/node](#orq-ainode)
|
|
24
|
-
* [SDK Installation](#sdk-installation)
|
|
25
|
-
* [Requirements](#requirements)
|
|
26
|
-
* [SDK Example Usage](#sdk-example-usage)
|
|
27
|
-
* [Authentication](#authentication)
|
|
28
|
-
* [Available Resources and Operations](#available-resources-and-operations)
|
|
29
|
-
* [Standalone functions](#standalone-functions)
|
|
30
|
-
* [Server-sent event streaming](#server-sent-event-streaming)
|
|
31
|
-
* [File uploads](#file-uploads)
|
|
32
|
-
* [Retries](#retries)
|
|
33
|
-
* [Error Handling](#error-handling)
|
|
34
|
-
* [Server Selection](#server-selection)
|
|
35
|
-
* [Custom HTTP Client](#custom-http-client)
|
|
36
|
-
* [Debugging](#debugging)
|
|
37
|
-
* [Development](#development)
|
|
38
|
-
* [Maturity](#maturity)
|
|
39
|
-
* [Contributions](#contributions)
|
|
40
|
-
|
|
41
|
-
<!-- End Table of Contents [toc] -->
|
|
42
|
-
|
|
43
|
-
<!-- Start SDK Installation [installation] -->
|
|
44
|
-
## SDK Installation
|
|
45
|
-
|
|
46
|
-
The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers.
|
|
47
|
-
|
|
48
|
-
### NPM
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
npm add @orq-ai/node
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### PNPM
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pnpm add @orq-ai/node
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Bun
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
bun add @orq-ai/node
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Yarn
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
yarn add @orq-ai/node
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### Model Context Protocol (MCP) Server
|
|
75
|
-
|
|
76
|
-
This SDK is also an installable MCP server where the various SDK methods are
|
|
77
|
-
exposed as tools that can be invoked by AI applications.
|
|
78
|
-
|
|
79
|
-
> Node.js v20 or greater is required to run the MCP server from npm.
|
|
80
|
-
|
|
81
|
-
<details>
|
|
82
|
-
<summary>Claude installation steps</summary>
|
|
83
|
-
|
|
84
|
-
Add the following server definition to your `claude_desktop_config.json` file:
|
|
85
|
-
|
|
86
|
-
```json
|
|
87
|
-
{
|
|
88
|
-
"mcpServers": {
|
|
89
|
-
"Orq": {
|
|
90
|
-
"command": "npx",
|
|
91
|
-
"args": [
|
|
92
|
-
"-y", "--package", "@orq-ai/node",
|
|
93
|
-
"--",
|
|
94
|
-
"mcp", "start",
|
|
95
|
-
"--api-key", "...",
|
|
96
|
-
"--contact-id", "...",
|
|
97
|
-
"--environment", "..."
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
</details>
|
|
105
|
-
|
|
106
|
-
<details>
|
|
107
|
-
<summary>Cursor installation steps</summary>
|
|
108
|
-
|
|
109
|
-
Create a `.cursor/mcp.json` file in your project root with the following content:
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"mcpServers": {
|
|
114
|
-
"Orq": {
|
|
115
|
-
"command": "npx",
|
|
116
|
-
"args": [
|
|
117
|
-
"-y", "--package", "@orq-ai/node",
|
|
118
|
-
"--",
|
|
119
|
-
"mcp", "start",
|
|
120
|
-
"--api-key", "...",
|
|
121
|
-
"--contact-id", "...",
|
|
122
|
-
"--environment", "..."
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
</details>
|
|
130
|
-
|
|
131
|
-
You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
curl -L -o mcp-server \
|
|
135
|
-
https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \
|
|
136
|
-
chmod +x mcp-server
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
If the repo is a private repo you must add your Github PAT to download a release `-H "Authorization: Bearer {GITHUB_PAT}"`.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```json
|
|
143
|
-
{
|
|
144
|
-
"mcpServers": {
|
|
145
|
-
"Todos": {
|
|
146
|
-
"command": "./DOWNLOAD/PATH/mcp-server",
|
|
147
|
-
"args": [
|
|
148
|
-
"start"
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
For a full list of server arguments, run:
|
|
156
|
-
|
|
157
|
-
```sh
|
|
158
|
-
npx -y --package @orq-ai/node -- mcp start --help
|
|
159
|
-
```
|
|
160
|
-
<!-- End SDK Installation [installation] -->
|
|
161
|
-
|
|
162
|
-
<!-- Start Requirements [requirements] -->
|
|
163
|
-
## Requirements
|
|
164
|
-
|
|
165
|
-
For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
|
|
166
|
-
<!-- End Requirements [requirements] -->
|
|
167
|
-
|
|
168
|
-
<!-- Start SDK Example Usage [usage] -->
|
|
169
|
-
## SDK Example Usage
|
|
170
|
-
|
|
171
|
-
### Example
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
import { Orq } from "@orq-ai/node";
|
|
175
|
-
|
|
176
|
-
const orq = new Orq({
|
|
177
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
async function run() {
|
|
181
|
-
const result = await orq.contacts.create({
|
|
182
|
-
externalId: "user_12345",
|
|
183
|
-
displayName: "Jane Smith",
|
|
184
|
-
email: "jane.smith@example.com",
|
|
185
|
-
avatarUrl: "https://example.com/avatars/jane-smith.jpg",
|
|
186
|
-
tags: [
|
|
187
|
-
"premium",
|
|
188
|
-
"beta-user",
|
|
189
|
-
"enterprise",
|
|
190
|
-
],
|
|
191
|
-
metadata: {
|
|
192
|
-
"department": "Engineering",
|
|
193
|
-
"role": "Senior Developer",
|
|
194
|
-
"subscription_tier": "premium",
|
|
195
|
-
"last_login": "2024-01-15T10:30:00Z",
|
|
196
|
-
},
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
console.log(result);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
run();
|
|
203
|
-
|
|
204
|
-
```
|
|
205
|
-
<!-- End SDK Example Usage [usage] -->
|
|
206
|
-
|
|
207
|
-
<!-- Start Authentication [security] -->
|
|
208
|
-
## Authentication
|
|
209
|
-
|
|
210
|
-
### Per-Client Security Schemes
|
|
211
|
-
|
|
212
|
-
This SDK supports the following security scheme globally:
|
|
213
|
-
|
|
214
|
-
| Name | Type | Scheme | Environment Variable |
|
|
215
|
-
| -------- | ---- | ----------- | -------------------- |
|
|
216
|
-
| `apiKey` | http | HTTP Bearer | `ORQ_API_KEY` |
|
|
217
|
-
|
|
218
|
-
To authenticate with the API the `apiKey` parameter must be set when initializing the SDK client instance. For example:
|
|
219
|
-
```typescript
|
|
220
|
-
import { Orq } from "@orq-ai/node";
|
|
221
|
-
|
|
222
|
-
const orq = new Orq({
|
|
223
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
async function run() {
|
|
227
|
-
const result = await orq.contacts.create({
|
|
228
|
-
externalId: "user_12345",
|
|
229
|
-
displayName: "Jane Smith",
|
|
230
|
-
email: "jane.smith@example.com",
|
|
231
|
-
avatarUrl: "https://example.com/avatars/jane-smith.jpg",
|
|
232
|
-
tags: [
|
|
233
|
-
"premium",
|
|
234
|
-
"beta-user",
|
|
235
|
-
"enterprise",
|
|
236
|
-
],
|
|
237
|
-
metadata: {
|
|
238
|
-
"department": "Engineering",
|
|
239
|
-
"role": "Senior Developer",
|
|
240
|
-
"subscription_tier": "premium",
|
|
241
|
-
"last_login": "2024-01-15T10:30:00Z",
|
|
242
|
-
},
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
console.log(result);
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
run();
|
|
249
|
-
|
|
250
|
-
```
|
|
251
|
-
<!-- End Authentication [security] -->
|
|
252
|
-
|
|
253
|
-
<!-- Start Available Resources and Operations [operations] -->
|
|
254
|
-
## Available Resources and Operations
|
|
255
|
-
|
|
256
|
-
<details open>
|
|
257
|
-
<summary>Available methods</summary>
|
|
258
|
-
|
|
259
|
-
### [agents](docs/sdks/agents/README.md)
|
|
260
|
-
|
|
261
|
-
* [create](docs/sdks/agents/README.md#create) - Create agent
|
|
262
|
-
* [delete](docs/sdks/agents/README.md#delete) - Delete agent
|
|
263
|
-
* [retrieve](docs/sdks/agents/README.md#retrieve) - Retrieve agent
|
|
264
|
-
* [update](docs/sdks/agents/README.md#update) - Update agent
|
|
265
|
-
* [~~invoke~~](docs/sdks/agents/README.md#invoke) - Execute an agent task :warning: **Deprecated**
|
|
266
|
-
* [list](docs/sdks/agents/README.md#list) - List agents
|
|
267
|
-
* [~~run~~](docs/sdks/agents/README.md#run) - Run an agent with configuration :warning: **Deprecated**
|
|
268
|
-
* [~~streamRun~~](docs/sdks/agents/README.md#streamrun) - Run agent with streaming response :warning: **Deprecated**
|
|
269
|
-
* [~~stream~~](docs/sdks/agents/README.md#stream) - Stream agent execution in real-time :warning: **Deprecated**
|
|
270
|
-
|
|
271
|
-
#### [agents.responses](docs/sdks/responses/README.md)
|
|
272
|
-
|
|
273
|
-
* [create](docs/sdks/responses/README.md#create) - Create response
|
|
274
|
-
|
|
275
|
-
### [budgets](docs/sdks/budgets/README.md)
|
|
276
|
-
|
|
277
|
-
* [list](docs/sdks/budgets/README.md#list) - List budget configurations
|
|
278
|
-
* [create](docs/sdks/budgets/README.md#create) - Create budget configuration
|
|
279
|
-
* [get](docs/sdks/budgets/README.md#get) - Get budget configuration
|
|
280
|
-
* [update](docs/sdks/budgets/README.md#update) - Update budget configuration
|
|
281
|
-
* [delete](docs/sdks/budgets/README.md#delete) - Delete budget configuration
|
|
282
|
-
|
|
283
|
-
### [chunking](docs/sdks/chunking/README.md)
|
|
284
|
-
|
|
285
|
-
* [parse](docs/sdks/chunking/README.md#parse) - Parse text
|
|
286
|
-
|
|
287
|
-
### [contacts](docs/sdks/contacts/README.md)
|
|
288
|
-
|
|
289
|
-
* [create](docs/sdks/contacts/README.md#create) - Create a contact
|
|
290
|
-
* [list](docs/sdks/contacts/README.md#list) - List contacts
|
|
291
|
-
* [retrieve](docs/sdks/contacts/README.md#retrieve) - Retrieve a contact
|
|
292
|
-
* [update](docs/sdks/contacts/README.md#update) - Update a contact
|
|
293
|
-
* [delete](docs/sdks/contacts/README.md#delete) - Delete a contact
|
|
294
|
-
|
|
295
|
-
### [datasets](docs/sdks/datasets/README.md)
|
|
296
|
-
|
|
297
|
-
* [list](docs/sdks/datasets/README.md#list) - List datasets
|
|
298
|
-
* [create](docs/sdks/datasets/README.md#create) - Create a dataset
|
|
299
|
-
* [retrieve](docs/sdks/datasets/README.md#retrieve) - Retrieve a dataset
|
|
300
|
-
* [update](docs/sdks/datasets/README.md#update) - Update a dataset
|
|
301
|
-
* [delete](docs/sdks/datasets/README.md#delete) - Delete a dataset
|
|
302
|
-
* [listDatapoints](docs/sdks/datasets/README.md#listdatapoints) - List datapoints
|
|
303
|
-
* [createDatapoint](docs/sdks/datasets/README.md#createdatapoint) - Create a datapoint
|
|
304
|
-
* [retrieveDatapoint](docs/sdks/datasets/README.md#retrievedatapoint) - Retrieve a datapoint
|
|
305
|
-
* [updateDatapoint](docs/sdks/datasets/README.md#updatedatapoint) - Update a datapoint
|
|
306
|
-
* [deleteDatapoint](docs/sdks/datasets/README.md#deletedatapoint) - Delete a datapoint
|
|
307
|
-
* [clear](docs/sdks/datasets/README.md#clear) - Delete all datapoints
|
|
308
|
-
|
|
309
|
-
### [deployments](docs/sdks/deployments/README.md)
|
|
310
|
-
|
|
311
|
-
* [invoke](docs/sdks/deployments/README.md#invoke) - Invoke
|
|
312
|
-
* [list](docs/sdks/deployments/README.md#list) - List all deployments
|
|
313
|
-
* [getConfig](docs/sdks/deployments/README.md#getconfig) - Get config
|
|
314
|
-
* [stream](docs/sdks/deployments/README.md#stream) - Stream
|
|
315
|
-
|
|
316
|
-
#### [deployments.metrics](docs/sdks/metrics/README.md)
|
|
317
|
-
|
|
318
|
-
* [create](docs/sdks/metrics/README.md#create) - Add metrics
|
|
319
|
-
|
|
320
|
-
### [evals](docs/sdks/evals/README.md)
|
|
321
|
-
|
|
322
|
-
* [all](docs/sdks/evals/README.md#all) - Get all Evaluators
|
|
323
|
-
* [create](docs/sdks/evals/README.md#create) - Create an Evaluator
|
|
324
|
-
* [update](docs/sdks/evals/README.md#update) - Update an Evaluator
|
|
325
|
-
* [delete](docs/sdks/evals/README.md#delete) - Delete an Evaluator
|
|
326
|
-
|
|
327
|
-
### [feedback](docs/sdks/feedback/README.md)
|
|
328
|
-
|
|
329
|
-
* [create](docs/sdks/feedback/README.md#create) - Submit feedback
|
|
330
|
-
|
|
331
|
-
### [files](docs/sdks/files/README.md)
|
|
332
|
-
|
|
333
|
-
* [create](docs/sdks/files/README.md#create) - Create file
|
|
334
|
-
* [list](docs/sdks/files/README.md#list) - List all files
|
|
335
|
-
* [get](docs/sdks/files/README.md#get) - Retrieve a file
|
|
336
|
-
* [delete](docs/sdks/files/README.md#delete) - Delete file
|
|
337
|
-
|
|
338
|
-
### [knowledge](docs/sdks/knowledge/README.md)
|
|
339
|
-
|
|
340
|
-
* [list](docs/sdks/knowledge/README.md#list) - List all knowledge bases
|
|
341
|
-
* [create](docs/sdks/knowledge/README.md#create) - Create a knowledge
|
|
342
|
-
* [retrieve](docs/sdks/knowledge/README.md#retrieve) - Retrieves a knowledge base
|
|
343
|
-
* [update](docs/sdks/knowledge/README.md#update) - Updates a knowledge
|
|
344
|
-
* [delete](docs/sdks/knowledge/README.md#delete) - Deletes a knowledge
|
|
345
|
-
* [search](docs/sdks/knowledge/README.md#search) - Search knowledge base
|
|
346
|
-
* [listDatasources](docs/sdks/knowledge/README.md#listdatasources) - List all datasources
|
|
347
|
-
* [createDatasource](docs/sdks/knowledge/README.md#createdatasource) - Create a new datasource
|
|
348
|
-
* [retrieveDatasource](docs/sdks/knowledge/README.md#retrievedatasource) - Retrieve a datasource
|
|
349
|
-
* [deleteDatasource](docs/sdks/knowledge/README.md#deletedatasource) - Deletes a datasource
|
|
350
|
-
* [updateDatasource](docs/sdks/knowledge/README.md#updatedatasource) - Update a datasource
|
|
351
|
-
* [createChunks](docs/sdks/knowledge/README.md#createchunks) - Create chunks for a datasource
|
|
352
|
-
* [listChunks](docs/sdks/knowledge/README.md#listchunks) - List all chunks for a datasource
|
|
353
|
-
* [deleteChunks](docs/sdks/knowledge/README.md#deletechunks) - Delete multiple chunks
|
|
354
|
-
* [listChunksPaginated](docs/sdks/knowledge/README.md#listchunkspaginated) - List chunks with offset-based pagination
|
|
355
|
-
* [getChunksCount](docs/sdks/knowledge/README.md#getchunkscount) - Get chunks total count
|
|
356
|
-
* [updateChunk](docs/sdks/knowledge/README.md#updatechunk) - Update a chunk
|
|
357
|
-
* [deleteChunk](docs/sdks/knowledge/README.md#deletechunk) - Delete a chunk
|
|
358
|
-
* [retrieveChunk](docs/sdks/knowledge/README.md#retrievechunk) - Retrieve a chunk
|
|
359
|
-
|
|
360
|
-
### [memoryStores](docs/sdks/memorystores/README.md)
|
|
361
|
-
|
|
362
|
-
* [list](docs/sdks/memorystores/README.md#list) - List memory stores
|
|
363
|
-
* [create](docs/sdks/memorystores/README.md#create) - Create memory store
|
|
364
|
-
* [retrieve](docs/sdks/memorystores/README.md#retrieve) - Retrieve memory store
|
|
365
|
-
* [update](docs/sdks/memorystores/README.md#update) - Update memory store
|
|
366
|
-
* [delete](docs/sdks/memorystores/README.md#delete) - Delete memory store
|
|
367
|
-
* [listMemories](docs/sdks/memorystores/README.md#listmemories) - List all memories
|
|
368
|
-
* [createMemory](docs/sdks/memorystores/README.md#creatememory) - Create a new memory
|
|
369
|
-
* [retrieveMemory](docs/sdks/memorystores/README.md#retrievememory) - Retrieve a specific memory
|
|
370
|
-
* [updateMemory](docs/sdks/memorystores/README.md#updatememory) - Update a specific memory
|
|
371
|
-
* [deleteMemory](docs/sdks/memorystores/README.md#deletememory) - Delete a specific memory
|
|
372
|
-
* [listDocuments](docs/sdks/memorystores/README.md#listdocuments) - List all documents for a memory
|
|
373
|
-
* [createDocument](docs/sdks/memorystores/README.md#createdocument) - Create a new memory document
|
|
374
|
-
* [retrieveDocument](docs/sdks/memorystores/README.md#retrievedocument) - Retrieve a specific memory document
|
|
375
|
-
* [updateDocument](docs/sdks/memorystores/README.md#updatedocument) - Update a specific memory document
|
|
376
|
-
* [deleteDocument](docs/sdks/memorystores/README.md#deletedocument) - Delete a specific memory document
|
|
377
|
-
|
|
378
|
-
### [models](docs/sdks/models/README.md)
|
|
379
|
-
|
|
380
|
-
* [list](docs/sdks/models/README.md#list) - List models
|
|
381
|
-
|
|
382
|
-
### [prompts](docs/sdks/prompts/README.md)
|
|
383
|
-
|
|
384
|
-
* [list](docs/sdks/prompts/README.md#list) - List all prompts
|
|
385
|
-
* [create](docs/sdks/prompts/README.md#create) - Create a prompt
|
|
386
|
-
* [retrieve](docs/sdks/prompts/README.md#retrieve) - Retrieve a prompt
|
|
387
|
-
* [update](docs/sdks/prompts/README.md#update) - Update a prompt
|
|
388
|
-
* [delete](docs/sdks/prompts/README.md#delete) - Delete a prompt
|
|
389
|
-
* [listVersions](docs/sdks/prompts/README.md#listversions) - List all prompt versions
|
|
390
|
-
* [getVersion](docs/sdks/prompts/README.md#getversion) - Retrieve a prompt version
|
|
391
|
-
|
|
392
|
-
### [remoteconfigs](docs/sdks/remoteconfigs/README.md)
|
|
393
|
-
|
|
394
|
-
* [retrieve](docs/sdks/remoteconfigs/README.md#retrieve) - Retrieve a remote config
|
|
395
|
-
|
|
396
|
-
### [tools](docs/sdks/tools/README.md)
|
|
397
|
-
|
|
398
|
-
* [list](docs/sdks/tools/README.md#list) - List tools
|
|
399
|
-
* [create](docs/sdks/tools/README.md#create) - Create tool
|
|
400
|
-
* [update](docs/sdks/tools/README.md#update) - Update tool
|
|
401
|
-
* [delete](docs/sdks/tools/README.md#delete) - Delete tool
|
|
402
|
-
* [retrieve](docs/sdks/tools/README.md#retrieve) - Retrieve tool
|
|
403
|
-
|
|
404
|
-
</details>
|
|
405
|
-
<!-- End Available Resources and Operations [operations] -->
|
|
406
|
-
|
|
407
|
-
<!-- Start Standalone functions [standalone-funcs] -->
|
|
408
|
-
## Standalone functions
|
|
409
|
-
|
|
410
|
-
All the methods listed above are available as standalone functions. These
|
|
411
|
-
functions are ideal for use in applications running in the browser, serverless
|
|
412
|
-
runtimes or other environments where application bundle size is a primary
|
|
413
|
-
concern. When using a bundler to build your application, all unused
|
|
414
|
-
functionality will be either excluded from the final bundle or tree-shaken away.
|
|
415
|
-
|
|
416
|
-
To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
417
|
-
|
|
418
|
-
<details>
|
|
419
|
-
|
|
420
|
-
<summary>Available standalone functions</summary>
|
|
421
|
-
|
|
422
|
-
- [`agentsCreate`](docs/sdks/agents/README.md#create) - Create agent
|
|
423
|
-
- [`agentsDelete`](docs/sdks/agents/README.md#delete) - Delete agent
|
|
424
|
-
- [`agentsList`](docs/sdks/agents/README.md#list) - List agents
|
|
425
|
-
- [`agentsResponsesCreate`](docs/sdks/responses/README.md#create) - Create response
|
|
426
|
-
- [`agentsRetrieve`](docs/sdks/agents/README.md#retrieve) - Retrieve agent
|
|
427
|
-
- [`agentsUpdate`](docs/sdks/agents/README.md#update) - Update agent
|
|
428
|
-
- [`budgetsCreate`](docs/sdks/budgets/README.md#create) - Create budget configuration
|
|
429
|
-
- [`budgetsDelete`](docs/sdks/budgets/README.md#delete) - Delete budget configuration
|
|
430
|
-
- [`budgetsGet`](docs/sdks/budgets/README.md#get) - Get budget configuration
|
|
431
|
-
- [`budgetsList`](docs/sdks/budgets/README.md#list) - List budget configurations
|
|
432
|
-
- [`budgetsUpdate`](docs/sdks/budgets/README.md#update) - Update budget configuration
|
|
433
|
-
- [`chunkingParse`](docs/sdks/chunking/README.md#parse) - Parse text
|
|
434
|
-
- [`contactsCreate`](docs/sdks/contacts/README.md#create) - Create a contact
|
|
435
|
-
- [`contactsDelete`](docs/sdks/contacts/README.md#delete) - Delete a contact
|
|
436
|
-
- [`contactsList`](docs/sdks/contacts/README.md#list) - List contacts
|
|
437
|
-
- [`contactsRetrieve`](docs/sdks/contacts/README.md#retrieve) - Retrieve a contact
|
|
438
|
-
- [`contactsUpdate`](docs/sdks/contacts/README.md#update) - Update a contact
|
|
439
|
-
- [`datasetsClear`](docs/sdks/datasets/README.md#clear) - Delete all datapoints
|
|
440
|
-
- [`datasetsCreate`](docs/sdks/datasets/README.md#create) - Create a dataset
|
|
441
|
-
- [`datasetsCreateDatapoint`](docs/sdks/datasets/README.md#createdatapoint) - Create a datapoint
|
|
442
|
-
- [`datasetsDelete`](docs/sdks/datasets/README.md#delete) - Delete a dataset
|
|
443
|
-
- [`datasetsDeleteDatapoint`](docs/sdks/datasets/README.md#deletedatapoint) - Delete a datapoint
|
|
444
|
-
- [`datasetsList`](docs/sdks/datasets/README.md#list) - List datasets
|
|
445
|
-
- [`datasetsListDatapoints`](docs/sdks/datasets/README.md#listdatapoints) - List datapoints
|
|
446
|
-
- [`datasetsRetrieve`](docs/sdks/datasets/README.md#retrieve) - Retrieve a dataset
|
|
447
|
-
- [`datasetsRetrieveDatapoint`](docs/sdks/datasets/README.md#retrievedatapoint) - Retrieve a datapoint
|
|
448
|
-
- [`datasetsUpdate`](docs/sdks/datasets/README.md#update) - Update a dataset
|
|
449
|
-
- [`datasetsUpdateDatapoint`](docs/sdks/datasets/README.md#updatedatapoint) - Update a datapoint
|
|
450
|
-
- [`deploymentsGetConfig`](docs/sdks/deployments/README.md#getconfig) - Get config
|
|
451
|
-
- [`deploymentsInvoke`](docs/sdks/deployments/README.md#invoke) - Invoke
|
|
452
|
-
- [`deploymentsList`](docs/sdks/deployments/README.md#list) - List all deployments
|
|
453
|
-
- [`deploymentsMetricsCreate`](docs/sdks/metrics/README.md#create) - Add metrics
|
|
454
|
-
- [`deploymentsStream`](docs/sdks/deployments/README.md#stream) - Stream
|
|
455
|
-
- [`evalsAll`](docs/sdks/evals/README.md#all) - Get all Evaluators
|
|
456
|
-
- [`evalsCreate`](docs/sdks/evals/README.md#create) - Create an Evaluator
|
|
457
|
-
- [`evalsDelete`](docs/sdks/evals/README.md#delete) - Delete an Evaluator
|
|
458
|
-
- [`evalsUpdate`](docs/sdks/evals/README.md#update) - Update an Evaluator
|
|
459
|
-
- [`feedbackCreate`](docs/sdks/feedback/README.md#create) - Submit feedback
|
|
460
|
-
- [`filesCreate`](docs/sdks/files/README.md#create) - Create file
|
|
461
|
-
- [`filesDelete`](docs/sdks/files/README.md#delete) - Delete file
|
|
462
|
-
- [`filesGet`](docs/sdks/files/README.md#get) - Retrieve a file
|
|
463
|
-
- [`filesList`](docs/sdks/files/README.md#list) - List all files
|
|
464
|
-
- [`knowledgeCreate`](docs/sdks/knowledge/README.md#create) - Create a knowledge
|
|
465
|
-
- [`knowledgeCreateChunks`](docs/sdks/knowledge/README.md#createchunks) - Create chunks for a datasource
|
|
466
|
-
- [`knowledgeCreateDatasource`](docs/sdks/knowledge/README.md#createdatasource) - Create a new datasource
|
|
467
|
-
- [`knowledgeDelete`](docs/sdks/knowledge/README.md#delete) - Deletes a knowledge
|
|
468
|
-
- [`knowledgeDeleteChunk`](docs/sdks/knowledge/README.md#deletechunk) - Delete a chunk
|
|
469
|
-
- [`knowledgeDeleteChunks`](docs/sdks/knowledge/README.md#deletechunks) - Delete multiple chunks
|
|
470
|
-
- [`knowledgeDeleteDatasource`](docs/sdks/knowledge/README.md#deletedatasource) - Deletes a datasource
|
|
471
|
-
- [`knowledgeGetChunksCount`](docs/sdks/knowledge/README.md#getchunkscount) - Get chunks total count
|
|
472
|
-
- [`knowledgeList`](docs/sdks/knowledge/README.md#list) - List all knowledge bases
|
|
473
|
-
- [`knowledgeListChunks`](docs/sdks/knowledge/README.md#listchunks) - List all chunks for a datasource
|
|
474
|
-
- [`knowledgeListChunksPaginated`](docs/sdks/knowledge/README.md#listchunkspaginated) - List chunks with offset-based pagination
|
|
475
|
-
- [`knowledgeListDatasources`](docs/sdks/knowledge/README.md#listdatasources) - List all datasources
|
|
476
|
-
- [`knowledgeRetrieve`](docs/sdks/knowledge/README.md#retrieve) - Retrieves a knowledge base
|
|
477
|
-
- [`knowledgeRetrieveChunk`](docs/sdks/knowledge/README.md#retrievechunk) - Retrieve a chunk
|
|
478
|
-
- [`knowledgeRetrieveDatasource`](docs/sdks/knowledge/README.md#retrievedatasource) - Retrieve a datasource
|
|
479
|
-
- [`knowledgeSearch`](docs/sdks/knowledge/README.md#search) - Search knowledge base
|
|
480
|
-
- [`knowledgeUpdate`](docs/sdks/knowledge/README.md#update) - Updates a knowledge
|
|
481
|
-
- [`knowledgeUpdateChunk`](docs/sdks/knowledge/README.md#updatechunk) - Update a chunk
|
|
482
|
-
- [`knowledgeUpdateDatasource`](docs/sdks/knowledge/README.md#updatedatasource) - Update a datasource
|
|
483
|
-
- [`memoryStoresCreate`](docs/sdks/memorystores/README.md#create) - Create memory store
|
|
484
|
-
- [`memoryStoresCreateDocument`](docs/sdks/memorystores/README.md#createdocument) - Create a new memory document
|
|
485
|
-
- [`memoryStoresCreateMemory`](docs/sdks/memorystores/README.md#creatememory) - Create a new memory
|
|
486
|
-
- [`memoryStoresDelete`](docs/sdks/memorystores/README.md#delete) - Delete memory store
|
|
487
|
-
- [`memoryStoresDeleteDocument`](docs/sdks/memorystores/README.md#deletedocument) - Delete a specific memory document
|
|
488
|
-
- [`memoryStoresDeleteMemory`](docs/sdks/memorystores/README.md#deletememory) - Delete a specific memory
|
|
489
|
-
- [`memoryStoresList`](docs/sdks/memorystores/README.md#list) - List memory stores
|
|
490
|
-
- [`memoryStoresListDocuments`](docs/sdks/memorystores/README.md#listdocuments) - List all documents for a memory
|
|
491
|
-
- [`memoryStoresListMemories`](docs/sdks/memorystores/README.md#listmemories) - List all memories
|
|
492
|
-
- [`memoryStoresRetrieve`](docs/sdks/memorystores/README.md#retrieve) - Retrieve memory store
|
|
493
|
-
- [`memoryStoresRetrieveDocument`](docs/sdks/memorystores/README.md#retrievedocument) - Retrieve a specific memory document
|
|
494
|
-
- [`memoryStoresRetrieveMemory`](docs/sdks/memorystores/README.md#retrievememory) - Retrieve a specific memory
|
|
495
|
-
- [`memoryStoresUpdate`](docs/sdks/memorystores/README.md#update) - Update memory store
|
|
496
|
-
- [`memoryStoresUpdateDocument`](docs/sdks/memorystores/README.md#updatedocument) - Update a specific memory document
|
|
497
|
-
- [`memoryStoresUpdateMemory`](docs/sdks/memorystores/README.md#updatememory) - Update a specific memory
|
|
498
|
-
- [`modelsList`](docs/sdks/models/README.md#list) - List models
|
|
499
|
-
- [`promptsCreate`](docs/sdks/prompts/README.md#create) - Create a prompt
|
|
500
|
-
- [`promptsDelete`](docs/sdks/prompts/README.md#delete) - Delete a prompt
|
|
501
|
-
- [`promptsGetVersion`](docs/sdks/prompts/README.md#getversion) - Retrieve a prompt version
|
|
502
|
-
- [`promptsList`](docs/sdks/prompts/README.md#list) - List all prompts
|
|
503
|
-
- [`promptsListVersions`](docs/sdks/prompts/README.md#listversions) - List all prompt versions
|
|
504
|
-
- [`promptsRetrieve`](docs/sdks/prompts/README.md#retrieve) - Retrieve a prompt
|
|
505
|
-
- [`promptsUpdate`](docs/sdks/prompts/README.md#update) - Update a prompt
|
|
506
|
-
- [`remoteconfigsRetrieve`](docs/sdks/remoteconfigs/README.md#retrieve) - Retrieve a remote config
|
|
507
|
-
- [`toolsCreate`](docs/sdks/tools/README.md#create) - Create tool
|
|
508
|
-
- [`toolsDelete`](docs/sdks/tools/README.md#delete) - Delete tool
|
|
509
|
-
- [`toolsList`](docs/sdks/tools/README.md#list) - List tools
|
|
510
|
-
- [`toolsRetrieve`](docs/sdks/tools/README.md#retrieve) - Retrieve tool
|
|
511
|
-
- [`toolsUpdate`](docs/sdks/tools/README.md#update) - Update tool
|
|
512
|
-
- ~~[`agentsInvoke`](docs/sdks/agents/README.md#invoke)~~ - Execute an agent task :warning: **Deprecated**
|
|
513
|
-
- ~~[`agentsRun`](docs/sdks/agents/README.md#run)~~ - Run an agent with configuration :warning: **Deprecated**
|
|
514
|
-
- ~~[`agentsStream`](docs/sdks/agents/README.md#stream)~~ - Stream agent execution in real-time :warning: **Deprecated**
|
|
515
|
-
- ~~[`agentsStreamRun`](docs/sdks/agents/README.md#streamrun)~~ - Run agent with streaming response :warning: **Deprecated**
|
|
516
|
-
|
|
517
|
-
</details>
|
|
518
|
-
<!-- End Standalone functions [standalone-funcs] -->
|
|
519
|
-
|
|
520
|
-
<!-- Start Server-sent event streaming [eventstream] -->
|
|
521
|
-
## Server-sent event streaming
|
|
522
|
-
|
|
523
|
-
[Server-sent events][mdn-sse] are used to stream content from certain
|
|
524
|
-
operations. These operations will expose the stream as an async iterable that
|
|
525
|
-
can be consumed using a [`for await...of`][mdn-for-await-of] loop. The loop will
|
|
526
|
-
terminate when the server no longer has any events to send and closes the
|
|
527
|
-
underlying connection.
|
|
528
|
-
|
|
529
|
-
```typescript
|
|
530
|
-
import { Orq } from "@orq-ai/node";
|
|
531
|
-
|
|
532
|
-
const orq = new Orq({
|
|
533
|
-
environment: "<value>",
|
|
534
|
-
contactId: "<id>",
|
|
535
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
536
|
-
});
|
|
537
|
-
|
|
538
|
-
async function run() {
|
|
539
|
-
const result = await orq.deployments.stream({
|
|
540
|
-
key: "<key>",
|
|
541
|
-
});
|
|
542
|
-
|
|
543
|
-
for await (const event of result) {
|
|
544
|
-
console.log(event);
|
|
545
|
-
}
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
run();
|
|
549
|
-
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
[mdn-sse]: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events
|
|
553
|
-
[mdn-for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
|
|
554
|
-
<!-- End Server-sent event streaming [eventstream] -->
|
|
555
|
-
|
|
556
|
-
<!-- Start File uploads [file-upload] -->
|
|
557
|
-
## File uploads
|
|
558
|
-
|
|
559
|
-
Certain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
|
|
560
|
-
|
|
561
|
-
> [!TIP]
|
|
562
|
-
>
|
|
563
|
-
> Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory:
|
|
564
|
-
>
|
|
565
|
-
> - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options).
|
|
566
|
-
> - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads.
|
|
567
|
-
> - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `<input type="file">` element.
|
|
568
|
-
> - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
|
|
569
|
-
|
|
570
|
-
```typescript
|
|
571
|
-
import { Orq } from "@orq-ai/node";
|
|
572
|
-
import { openAsBlob } from "node:fs";
|
|
573
|
-
|
|
574
|
-
const orq = new Orq({
|
|
575
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
576
|
-
});
|
|
577
|
-
|
|
578
|
-
async function run() {
|
|
579
|
-
const result = await orq.files.create({
|
|
580
|
-
file: await openAsBlob("example.file"),
|
|
581
|
-
});
|
|
582
|
-
|
|
583
|
-
console.log(result);
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
run();
|
|
587
|
-
|
|
588
|
-
```
|
|
589
|
-
<!-- End File uploads [file-upload] -->
|
|
590
|
-
|
|
591
|
-
<!-- Start Retries [retries] -->
|
|
592
|
-
## Retries
|
|
593
|
-
|
|
594
|
-
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
|
595
|
-
|
|
596
|
-
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
|
|
597
|
-
```typescript
|
|
598
|
-
import { Orq } from "@orq-ai/node";
|
|
599
|
-
|
|
600
|
-
const orq = new Orq({
|
|
601
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
602
|
-
});
|
|
603
|
-
|
|
604
|
-
async function run() {
|
|
605
|
-
const result = await orq.contacts.create({
|
|
606
|
-
externalId: "user_12345",
|
|
607
|
-
displayName: "Jane Smith",
|
|
608
|
-
email: "jane.smith@example.com",
|
|
609
|
-
avatarUrl: "https://example.com/avatars/jane-smith.jpg",
|
|
610
|
-
tags: [
|
|
611
|
-
"premium",
|
|
612
|
-
"beta-user",
|
|
613
|
-
"enterprise",
|
|
614
|
-
],
|
|
615
|
-
metadata: {
|
|
616
|
-
"department": "Engineering",
|
|
617
|
-
"role": "Senior Developer",
|
|
618
|
-
"subscription_tier": "premium",
|
|
619
|
-
"last_login": "2024-01-15T10:30:00Z",
|
|
620
|
-
},
|
|
621
|
-
}, {
|
|
622
|
-
retries: {
|
|
623
|
-
strategy: "backoff",
|
|
624
|
-
backoff: {
|
|
625
|
-
initialInterval: 1,
|
|
626
|
-
maxInterval: 50,
|
|
627
|
-
exponent: 1.1,
|
|
628
|
-
maxElapsedTime: 100,
|
|
629
|
-
},
|
|
630
|
-
retryConnectionErrors: false,
|
|
631
|
-
},
|
|
632
|
-
});
|
|
633
|
-
|
|
634
|
-
console.log(result);
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
run();
|
|
638
|
-
|
|
639
|
-
```
|
|
640
|
-
|
|
641
|
-
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
|
|
642
|
-
```typescript
|
|
643
|
-
import { Orq } from "@orq-ai/node";
|
|
644
|
-
|
|
645
|
-
const orq = new Orq({
|
|
646
|
-
retryConfig: {
|
|
647
|
-
strategy: "backoff",
|
|
648
|
-
backoff: {
|
|
649
|
-
initialInterval: 1,
|
|
650
|
-
maxInterval: 50,
|
|
651
|
-
exponent: 1.1,
|
|
652
|
-
maxElapsedTime: 100,
|
|
653
|
-
},
|
|
654
|
-
retryConnectionErrors: false,
|
|
655
|
-
},
|
|
656
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
657
|
-
});
|
|
658
|
-
|
|
659
|
-
async function run() {
|
|
660
|
-
const result = await orq.contacts.create({
|
|
661
|
-
externalId: "user_12345",
|
|
662
|
-
displayName: "Jane Smith",
|
|
663
|
-
email: "jane.smith@example.com",
|
|
664
|
-
avatarUrl: "https://example.com/avatars/jane-smith.jpg",
|
|
665
|
-
tags: [
|
|
666
|
-
"premium",
|
|
667
|
-
"beta-user",
|
|
668
|
-
"enterprise",
|
|
669
|
-
],
|
|
670
|
-
metadata: {
|
|
671
|
-
"department": "Engineering",
|
|
672
|
-
"role": "Senior Developer",
|
|
673
|
-
"subscription_tier": "premium",
|
|
674
|
-
"last_login": "2024-01-15T10:30:00Z",
|
|
675
|
-
},
|
|
676
|
-
});
|
|
677
|
-
|
|
678
|
-
console.log(result);
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
run();
|
|
682
|
-
|
|
683
|
-
```
|
|
684
|
-
<!-- End Retries [retries] -->
|
|
685
|
-
|
|
686
|
-
<!-- Start Error Handling [errors] -->
|
|
687
|
-
## Error Handling
|
|
688
|
-
|
|
689
|
-
[`OrqError`](./src/models/errors/orqerror.ts) is the base class for all HTTP error responses. It has the following properties:
|
|
690
|
-
|
|
691
|
-
| Property | Type | Description |
|
|
692
|
-
| ------------------- | ---------- | --------------------------------------------------------------------------------------- |
|
|
693
|
-
| `error.message` | `string` | Error message |
|
|
694
|
-
| `error.statusCode` | `number` | HTTP response status code eg `404` |
|
|
695
|
-
| `error.headers` | `Headers` | HTTP response headers |
|
|
696
|
-
| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. |
|
|
697
|
-
| `error.rawResponse` | `Response` | Raw HTTP response |
|
|
698
|
-
| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
|
|
699
|
-
|
|
700
|
-
### Example
|
|
701
|
-
```typescript
|
|
702
|
-
import { Orq } from "@orq-ai/node";
|
|
703
|
-
import * as errors from "@orq-ai/node/models/errors";
|
|
704
|
-
|
|
705
|
-
const orq = new Orq({
|
|
706
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
707
|
-
});
|
|
708
|
-
|
|
709
|
-
async function run() {
|
|
710
|
-
try {
|
|
711
|
-
const result = await orq.contacts.retrieve({
|
|
712
|
-
id: "<id>",
|
|
713
|
-
});
|
|
714
|
-
|
|
715
|
-
console.log(result);
|
|
716
|
-
} catch (error) {
|
|
717
|
-
// The base class for HTTP error responses
|
|
718
|
-
if (error instanceof errors.OrqError) {
|
|
719
|
-
console.log(error.message);
|
|
720
|
-
console.log(error.statusCode);
|
|
721
|
-
console.log(error.body);
|
|
722
|
-
console.log(error.headers);
|
|
723
|
-
|
|
724
|
-
// Depending on the method different errors may be thrown
|
|
725
|
-
if (error instanceof errors.RetrieveContactResponseBody) {
|
|
726
|
-
console.log(error.data$.error); // string
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
run();
|
|
733
|
-
|
|
734
|
-
```
|
|
735
|
-
|
|
736
|
-
### Error Classes
|
|
737
|
-
**Primary error:**
|
|
738
|
-
* [`OrqError`](./src/models/errors/orqerror.ts): The base class for HTTP error responses.
|
|
739
|
-
|
|
740
|
-
<details><summary>Less common errors (23)</summary>
|
|
741
|
-
|
|
742
|
-
<br />
|
|
743
|
-
|
|
744
|
-
**Network errors:**
|
|
745
|
-
* [`ConnectionError`](./src/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server.
|
|
746
|
-
* [`RequestTimeoutError`](./src/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal.
|
|
747
|
-
* [`RequestAbortedError`](./src/models/errors/httpclienterrors.ts): HTTP request was aborted by the client.
|
|
748
|
-
* [`InvalidRequestError`](./src/models/errors/httpclienterrors.ts): Any input used to create a request is invalid.
|
|
749
|
-
* [`UnexpectedClientError`](./src/models/errors/httpclienterrors.ts): Unrecognised or unexpected error.
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
**Inherit from [`OrqError`](./src/models/errors/orqerror.ts)**:
|
|
753
|
-
* [`HonoApiError`](./src/models/errors/honoapierror.ts): Applicable to 10 of 94 methods.*
|
|
754
|
-
* [`RetrieveContactResponseBody`](./src/models/errors/retrievecontactresponsebody.ts): Contact not found. Status code `404`. Applicable to 1 of 94 methods.*
|
|
755
|
-
* [`UpdateContactResponseBody`](./src/models/errors/updatecontactresponsebody.ts): Contact not found. Status code `404`. Applicable to 1 of 94 methods.*
|
|
756
|
-
* [`DeleteContactResponseBody`](./src/models/errors/deletecontactresponsebody.ts): Contact not found. Status code `404`. Applicable to 1 of 94 methods.*
|
|
757
|
-
* [`GetEvalsResponseBody`](./src/models/errors/getevalsresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 94 methods.*
|
|
758
|
-
* [`CreateEvalResponseBody`](./src/models/errors/createevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 94 methods.*
|
|
759
|
-
* [`UpdateEvalResponseBody`](./src/models/errors/updateevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 94 methods.*
|
|
760
|
-
* [`DeleteEvalResponseBody`](./src/models/errors/deleteevalresponsebody.ts): Workspace ID is not found on the request. Status code `404`. Applicable to 1 of 94 methods.*
|
|
761
|
-
* [`DeleteAgentResponseBody`](./src/models/errors/deleteagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or has already been deleted. Status code `404`. Applicable to 1 of 94 methods.*
|
|
762
|
-
* [`RetrieveAgentRequestResponseBody`](./src/models/errors/retrieveagentrequestresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to access it. Status code `404`. Applicable to 1 of 94 methods.*
|
|
763
|
-
* [`UpdateAgentResponseBody`](./src/models/errors/updateagentresponsebody.ts): Agent not found. The specified agent key does not exist in the workspace or you do not have permission to modify it. Status code `404`. Applicable to 1 of 94 methods.*
|
|
764
|
-
* [`StreamRunAgentResponseBody`](./src/models/errors/streamrunagentresponsebody.ts): Model not found. Status code `404`. Applicable to 1 of 94 methods.*
|
|
765
|
-
* [`StreamAgentResponseBody`](./src/models/errors/streamagentresponsebody.ts): Agent not found. Status code `404`. Applicable to 1 of 94 methods.*
|
|
766
|
-
* [`UpdatePromptResponseBody`](./src/models/errors/updatepromptresponsebody.ts): Prompt not found. Status code `404`. Applicable to 1 of 94 methods.*
|
|
767
|
-
* [`GetPromptVersionResponseBody`](./src/models/errors/getpromptversionresponsebody.ts): Not Found - The prompt or prompt version does not exist. Status code `404`. Applicable to 1 of 94 methods.*
|
|
768
|
-
* [`UpdateToolResponseBody`](./src/models/errors/updatetoolresponsebody.ts): Tool not found. Status code `404`. Applicable to 1 of 94 methods.*
|
|
769
|
-
* [`CreateAgentRequestResponseBody`](./src/models/errors/createagentrequestresponsebody.ts): Conflict - An agent with the specified key already exists in this workspace. Each agent must have a unique key within a workspace to ensure proper identification and management. Status code `409`. Applicable to 1 of 94 methods.*
|
|
770
|
-
* [`ResponseValidationError`](./src/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string.
|
|
771
|
-
|
|
772
|
-
</details>
|
|
773
|
-
|
|
774
|
-
\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
|
|
775
|
-
<!-- End Error Handling [errors] -->
|
|
776
|
-
|
|
777
|
-
<!-- Start Server Selection [server] -->
|
|
778
|
-
## Server Selection
|
|
779
|
-
|
|
780
|
-
### Override Server URL Per-Client
|
|
781
|
-
|
|
782
|
-
The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example:
|
|
783
|
-
```typescript
|
|
784
|
-
import { Orq } from "@orq-ai/node";
|
|
785
|
-
|
|
786
|
-
const orq = new Orq({
|
|
787
|
-
serverURL: "https://my.orq.ai",
|
|
788
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
789
|
-
});
|
|
790
|
-
|
|
791
|
-
async function run() {
|
|
792
|
-
const result = await orq.contacts.create({
|
|
793
|
-
externalId: "user_12345",
|
|
794
|
-
displayName: "Jane Smith",
|
|
795
|
-
email: "jane.smith@example.com",
|
|
796
|
-
avatarUrl: "https://example.com/avatars/jane-smith.jpg",
|
|
797
|
-
tags: [
|
|
798
|
-
"premium",
|
|
799
|
-
"beta-user",
|
|
800
|
-
"enterprise",
|
|
801
|
-
],
|
|
802
|
-
metadata: {
|
|
803
|
-
"department": "Engineering",
|
|
804
|
-
"role": "Senior Developer",
|
|
805
|
-
"subscription_tier": "premium",
|
|
806
|
-
"last_login": "2024-01-15T10:30:00Z",
|
|
807
|
-
},
|
|
808
|
-
});
|
|
809
|
-
|
|
810
|
-
console.log(result);
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
run();
|
|
814
|
-
|
|
815
|
-
```
|
|
816
|
-
<!-- End Server Selection [server] -->
|
|
817
|
-
|
|
818
|
-
<!-- Start Custom HTTP Client [http-client] -->
|
|
819
|
-
## Custom HTTP Client
|
|
820
|
-
|
|
821
|
-
The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
|
|
822
|
-
[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
|
|
823
|
-
client is a thin wrapper around `fetch` and provides the ability to attach hooks
|
|
824
|
-
around the request lifecycle that can be used to modify the request or handle
|
|
825
|
-
errors and response.
|
|
826
|
-
|
|
827
|
-
The `HTTPClient` constructor takes an optional `fetcher` argument that can be
|
|
828
|
-
used to integrate a third-party HTTP client or when writing tests to mock out
|
|
829
|
-
the HTTP client and feed in fixtures.
|
|
830
|
-
|
|
831
|
-
The following example shows how to use the `"beforeRequest"` hook to to add a
|
|
832
|
-
custom header and a timeout to requests and how to use the `"requestError"` hook
|
|
833
|
-
to log errors:
|
|
834
|
-
|
|
835
|
-
```typescript
|
|
836
|
-
import { Orq } from "@orq-ai/node";
|
|
837
|
-
import { HTTPClient } from "@orq-ai/node/lib/http";
|
|
838
|
-
|
|
839
|
-
const httpClient = new HTTPClient({
|
|
840
|
-
// fetcher takes a function that has the same signature as native `fetch`.
|
|
841
|
-
fetcher: (request) => {
|
|
842
|
-
return fetch(request);
|
|
843
|
-
}
|
|
844
|
-
});
|
|
845
|
-
|
|
846
|
-
httpClient.addHook("beforeRequest", (request) => {
|
|
847
|
-
const nextRequest = new Request(request, {
|
|
848
|
-
signal: request.signal || AbortSignal.timeout(5000)
|
|
849
|
-
});
|
|
850
|
-
|
|
851
|
-
nextRequest.headers.set("x-custom-header", "custom value");
|
|
852
|
-
|
|
853
|
-
return nextRequest;
|
|
854
|
-
});
|
|
855
|
-
|
|
856
|
-
httpClient.addHook("requestError", (error, request) => {
|
|
857
|
-
console.group("Request Error");
|
|
858
|
-
console.log("Reason:", `${error}`);
|
|
859
|
-
console.log("Endpoint:", `${request.method} ${request.url}`);
|
|
860
|
-
console.groupEnd();
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
const sdk = new Orq({ httpClient: httpClient });
|
|
864
|
-
```
|
|
865
|
-
<!-- End Custom HTTP Client [http-client] -->
|
|
866
|
-
|
|
867
|
-
<!-- Start Debugging [debug] -->
|
|
868
|
-
## Debugging
|
|
869
|
-
|
|
870
|
-
You can setup your SDK to emit debug logs for SDK requests and responses.
|
|
871
|
-
|
|
872
|
-
You can pass a logger that matches `console`'s interface as an SDK option.
|
|
873
|
-
|
|
874
|
-
> [!WARNING]
|
|
875
|
-
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
|
|
876
|
-
|
|
877
|
-
```typescript
|
|
878
|
-
import { Orq } from "@orq-ai/node";
|
|
879
|
-
|
|
880
|
-
const sdk = new Orq({ debugLogger: console });
|
|
881
|
-
```
|
|
882
|
-
|
|
883
|
-
You can also enable a default debug logger by setting an environment variable `ORQ_DEBUG` to true.
|
|
884
|
-
<!-- End Debugging [debug] -->
|
|
885
|
-
|
|
886
|
-
<!-- Placeholder for Future Speakeasy SDK Sections -->
|
|
887
|
-
|
|
888
|
-
# Development
|
|
889
|
-
|
|
890
|
-
## Maturity
|
|
891
|
-
|
|
892
|
-
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
|
|
893
|
-
to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
|
|
894
|
-
looking for the latest version.
|
|
895
|
-
|
|
896
|
-
## Contributions
|
|
897
|
-
|
|
898
|
-
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
|
|
899
|
-
We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
|
|
900
|
-
|
|
901
|
-
### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=@orq-ai/node&utm_campaign=typescript)
|