@iblai/iblai-api 3.61.2-ai-plus → 3.62.0-ai

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.
Files changed (111) hide show
  1. package/dist/index.cjs.js +398 -1801
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +399 -1800
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +398 -1801
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +2 -41
  8. package/dist/types/models/AIGeneratedImage.d.ts +2 -2
  9. package/dist/types/models/CrawlerPatternTypeEnum.d.ts +8 -0
  10. package/dist/types/models/PatchedRbacRole.d.ts +4 -0
  11. package/dist/types/models/{Provider637Enum.d.ts → ProviderEnum.d.ts} +1 -1
  12. package/dist/types/models/RbacBaseRole.d.ts +5 -1
  13. package/dist/types/models/RbacRole.d.ts +5 -1
  14. package/dist/types/models/RetrieverDocumentEmbedding.d.ts +3 -2
  15. package/dist/types/models/RetrieverDocumentEmbeddingRequest.d.ts +7 -3
  16. package/dist/types/models/TrainDocumentViewRequest.d.ts +7 -3
  17. package/dist/types/models/Voice.d.ts +2 -2
  18. package/dist/types/services/AiMentorService.d.ts +0 -13
  19. package/package.json +1 -1
  20. package/src/core/OpenAPI.ts +1 -1
  21. package/src/index.ts +2 -41
  22. package/src/models/AIGeneratedImage.ts +2 -2
  23. package/src/models/{Provider63aEnum.ts → CrawlerPatternTypeEnum.ts} +5 -3
  24. package/src/models/PatchedRbacRole.ts +4 -0
  25. package/src/models/{Provider637Enum.ts → ProviderEnum.ts} +1 -1
  26. package/src/models/RbacBaseRole.ts +5 -1
  27. package/src/models/RbacRole.ts +5 -1
  28. package/src/models/RetrieverDocumentEmbedding.ts +3 -2
  29. package/src/models/RetrieverDocumentEmbeddingRequest.ts +7 -3
  30. package/src/models/TrainDocumentViewRequest.ts +7 -3
  31. package/src/models/Voice.ts +2 -2
  32. package/src/services/AiMentorService.ts +0 -29
  33. package/dist/types/models/Bot.d.ts +0 -15
  34. package/dist/types/models/BotCommand.d.ts +0 -6
  35. package/dist/types/models/BotCreate.d.ts +0 -12
  36. package/dist/types/models/DataSet.d.ts +0 -21
  37. package/dist/types/models/DataSetCreate.d.ts +0 -12
  38. package/dist/types/models/DataSetStatusEnum.d.ts +0 -12
  39. package/dist/types/models/DiscordConfig.d.ts +0 -7
  40. package/dist/types/models/DiscordUserConfig.d.ts +0 -10
  41. package/dist/types/models/DiscordWebhook.d.ts +0 -6
  42. package/dist/types/models/MentorFromTemplateRequest.d.ts +0 -4
  43. package/dist/types/models/PaginatedDataSetList.d.ts +0 -7
  44. package/dist/types/models/PaginatedTrainingList.d.ts +0 -7
  45. package/dist/types/models/PatchedBotCommand.d.ts +0 -6
  46. package/dist/types/models/PatchedBotCreate.d.ts +0 -12
  47. package/dist/types/models/PatchedDataSet.d.ts +0 -21
  48. package/dist/types/models/PatchedDiscordConfig.d.ts +0 -7
  49. package/dist/types/models/PatchedDiscordUserConfig.d.ts +0 -10
  50. package/dist/types/models/PatchedSlackConfig.d.ts +0 -8
  51. package/dist/types/models/PatchedSlackUserConfig.d.ts +0 -17
  52. package/dist/types/models/PatchedTeamsConfig.d.ts +0 -7
  53. package/dist/types/models/PatchedTrainingCreate.d.ts +0 -31
  54. package/dist/types/models/PatchedWebexConfig.d.ts +0 -10
  55. package/dist/types/models/PatchedWhatsappConfig.d.ts +0 -11
  56. package/dist/types/models/PatchedWhatsappUserConfig.d.ts +0 -10
  57. package/dist/types/models/Provider05cEnum.d.ts +0 -14
  58. package/dist/types/models/Provider63aEnum.d.ts +0 -6
  59. package/dist/types/models/SlackConfig.d.ts +0 -8
  60. package/dist/types/models/SlackUserConfig.d.ts +0 -17
  61. package/dist/types/models/SlackWebhook.d.ts +0 -6
  62. package/dist/types/models/TeamsConfig.d.ts +0 -7
  63. package/dist/types/models/TeamsWebhook.d.ts +0 -17
  64. package/dist/types/models/Training.d.ts +0 -41
  65. package/dist/types/models/TrainingCreate.d.ts +0 -31
  66. package/dist/types/models/WebexConfig.d.ts +0 -10
  67. package/dist/types/models/WebexWebhook.d.ts +0 -4
  68. package/dist/types/models/WhatAppWebHook.d.ts +0 -3
  69. package/dist/types/models/WhatsappConfig.d.ts +0 -11
  70. package/dist/types/models/WhatsappUserConfig.d.ts +0 -10
  71. package/dist/types/services/AiBotService.d.ts +0 -642
  72. package/dist/types/services/AiFinetuningService.d.ts +0 -232
  73. package/src/models/Bot.ts +0 -20
  74. package/src/models/BotCommand.ts +0 -11
  75. package/src/models/BotCreate.ts +0 -17
  76. package/src/models/DataSet.ts +0 -26
  77. package/src/models/DataSetCreate.ts +0 -17
  78. package/src/models/DataSetStatusEnum.ts +0 -16
  79. package/src/models/DiscordConfig.ts +0 -12
  80. package/src/models/DiscordUserConfig.ts +0 -15
  81. package/src/models/DiscordWebhook.ts +0 -11
  82. package/src/models/MentorFromTemplateRequest.ts +0 -9
  83. package/src/models/PaginatedDataSetList.ts +0 -12
  84. package/src/models/PaginatedTrainingList.ts +0 -12
  85. package/src/models/PatchedBotCommand.ts +0 -11
  86. package/src/models/PatchedBotCreate.ts +0 -17
  87. package/src/models/PatchedDataSet.ts +0 -26
  88. package/src/models/PatchedDiscordConfig.ts +0 -12
  89. package/src/models/PatchedDiscordUserConfig.ts +0 -15
  90. package/src/models/PatchedSlackConfig.ts +0 -13
  91. package/src/models/PatchedSlackUserConfig.ts +0 -22
  92. package/src/models/PatchedTeamsConfig.ts +0 -12
  93. package/src/models/PatchedTrainingCreate.ts +0 -36
  94. package/src/models/PatchedWebexConfig.ts +0 -15
  95. package/src/models/PatchedWhatsappConfig.ts +0 -16
  96. package/src/models/PatchedWhatsappUserConfig.ts +0 -15
  97. package/src/models/Provider05cEnum.ts +0 -18
  98. package/src/models/SlackConfig.ts +0 -13
  99. package/src/models/SlackUserConfig.ts +0 -22
  100. package/src/models/SlackWebhook.ts +0 -11
  101. package/src/models/TeamsConfig.ts +0 -12
  102. package/src/models/TeamsWebhook.ts +0 -22
  103. package/src/models/Training.ts +0 -46
  104. package/src/models/TrainingCreate.ts +0 -36
  105. package/src/models/WebexConfig.ts +0 -15
  106. package/src/models/WebexWebhook.ts +0 -9
  107. package/src/models/WhatAppWebHook.ts +0 -8
  108. package/src/models/WhatsappConfig.ts +0 -16
  109. package/src/models/WhatsappUserConfig.ts +0 -15
  110. package/src/services/AiBotService.ts +0 -1330
  111. package/src/services/AiFinetuningService.ts +0 -472
package/dist/index.umd.js CHANGED
@@ -114,7 +114,7 @@
114
114
 
115
115
  const OpenAPI = {
116
116
  BASE: 'https://base.manager.iblai.app',
117
- VERSION: '3.61.2-ai-plus',
117
+ VERSION: '3.62.0-ai',
118
118
  WITH_CREDENTIALS: false,
119
119
  CREDENTIALS: 'include',
120
120
  TOKEN: undefined,
@@ -254,18 +254,14 @@
254
254
  /* tslint:disable */
255
255
  /* eslint-disable */
256
256
  /**
257
- * * `pending` - Pending
258
- * * `processing` - Processing
259
- * * `completed` - Completed
260
- * * `failed` - Failed
257
+ * * `glob` - Glob
258
+ * * `regex` - Regex
261
259
  */
262
- exports.DataSetStatusEnum = void 0;
263
- (function (DataSetStatusEnum) {
264
- DataSetStatusEnum["PENDING"] = "pending";
265
- DataSetStatusEnum["PROCESSING"] = "processing";
266
- DataSetStatusEnum["COMPLETED"] = "completed";
267
- DataSetStatusEnum["FAILED"] = "failed";
268
- })(exports.DataSetStatusEnum || (exports.DataSetStatusEnum = {}));
260
+ exports.CrawlerPatternTypeEnum = void 0;
261
+ (function (CrawlerPatternTypeEnum) {
262
+ CrawlerPatternTypeEnum["GLOB"] = "glob";
263
+ CrawlerPatternTypeEnum["REGEX"] = "regex";
264
+ })(exports.CrawlerPatternTypeEnum || (exports.CrawlerPatternTypeEnum = {}));
269
265
 
270
266
  /* generated using openapi-typescript-codegen -- do not edit */
271
267
  /* istanbul ignore file */
@@ -547,26 +543,6 @@
547
543
  PromptVisibilityEnum["VIEWABLE_BY_ANYONE"] = "viewable_by_anyone";
548
544
  })(exports.PromptVisibilityEnum || (exports.PromptVisibilityEnum = {}));
549
545
 
550
- /* generated using openapi-typescript-codegen -- do not edit */
551
- /* istanbul ignore file */
552
- /* tslint:disable */
553
- /* eslint-disable */
554
- /**
555
- * * `webex` - Webex
556
- * * `slack` - Slack
557
- * * `whatsapp` - Whatsapp
558
- * * `discord` - Discord
559
- * * `teams` - Teams
560
- */
561
- exports.Provider05cEnum = void 0;
562
- (function (Provider05cEnum) {
563
- Provider05cEnum["WEBEX"] = "webex";
564
- Provider05cEnum["SLACK"] = "slack";
565
- Provider05cEnum["WHATSAPP"] = "whatsapp";
566
- Provider05cEnum["DISCORD"] = "discord";
567
- Provider05cEnum["TEAMS"] = "teams";
568
- })(exports.Provider05cEnum || (exports.Provider05cEnum = {}));
569
-
570
546
  /* generated using openapi-typescript-codegen -- do not edit */
571
547
  /* istanbul ignore file */
572
548
  /* tslint:disable */
@@ -576,24 +552,12 @@
576
552
  * * `google` - Google
577
553
  * * `elevenlabs` - Elevenlabs
578
554
  */
579
- exports.Provider637Enum = void 0;
580
- (function (Provider637Enum) {
581
- Provider637Enum["OPENAI"] = "openai";
582
- Provider637Enum["GOOGLE"] = "google";
583
- Provider637Enum["ELEVENLABS"] = "elevenlabs";
584
- })(exports.Provider637Enum || (exports.Provider637Enum = {}));
585
-
586
- /* generated using openapi-typescript-codegen -- do not edit */
587
- /* istanbul ignore file */
588
- /* tslint:disable */
589
- /* eslint-disable */
590
- /**
591
- * * `openai` - Openai
592
- */
593
- exports.Provider63aEnum = void 0;
594
- (function (Provider63aEnum) {
595
- Provider63aEnum["OPENAI"] = "openai";
596
- })(exports.Provider63aEnum || (exports.Provider63aEnum = {}));
555
+ exports.ProviderEnum = void 0;
556
+ (function (ProviderEnum) {
557
+ ProviderEnum["OPENAI"] = "openai";
558
+ ProviderEnum["GOOGLE"] = "google";
559
+ ProviderEnum["ELEVENLABS"] = "elevenlabs";
560
+ })(exports.ProviderEnum || (exports.ProviderEnum = {}));
597
561
 
598
562
  /* generated using openapi-typescript-codegen -- do not edit */
599
563
  /* istanbul ignore file */
@@ -9136,1871 +9100,530 @@
9136
9100
  }
9137
9101
  }
9138
9102
 
9139
- class AiBotService {
9103
+ class AiIndexService {
9140
9104
  /**
9141
- * Create modify and update bot information for a specific tenant.
9142
- * @returns Bot
9105
+ * Retrieve details of a specific document embedding.
9106
+ *
9107
+ * This endpoint returns detailed information about a specific
9108
+ * document embedding identified by its ID.
9109
+ *
9110
+ * Args:
9111
+ * request: The HTTP request.
9112
+ * org: Organization key identifier.
9113
+ * document_id: The ID of the document embedding to retrieve.
9114
+ *
9115
+ * Returns:
9116
+ * Response: Detailed information about the document embedding.
9117
+ *
9118
+ * Raises:
9119
+ * NotFound: If the specified document embedding does not exist.
9120
+ * @returns RetrieverDocumentEmbedding
9143
9121
  * @throws ApiError
9144
9122
  */
9145
- static aiBotV1BotsBotList({
9146
- org
9123
+ static aiIndexOrgsUsersDocumentsRetrieve({
9124
+ documentId,
9125
+ org,
9126
+ userId
9147
9127
  }) {
9148
9128
  return request(OpenAPI, {
9149
9129
  method: 'GET',
9150
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9130
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9151
9131
  path: {
9152
- 'org': org
9132
+ 'document_id': documentId,
9133
+ 'org': org,
9134
+ 'user_id': userId
9135
+ },
9136
+ errors: {
9137
+ 404: `Document not found`
9153
9138
  }
9154
9139
  });
9155
9140
  }
9156
9141
  /**
9157
- * Create modify and update bot information for a specific tenant.
9158
- * @returns BotCreate
9142
+ * Update a specific document embedding.
9143
+ *
9144
+ * This endpoint allows updating various properties of a document embedding,
9145
+ * including its name, type, pathway, and training status.
9146
+ *
9147
+ * Args:
9148
+ * request: The HTTP request containing the updated document data.
9149
+ * org: Organization key identifier.
9150
+ * document_id: The ID of the document embedding to update.
9151
+ *
9152
+ * Returns:
9153
+ * Response: The updated document embedding information.
9154
+ *
9155
+ * Raises:
9156
+ * BadRequest: If the provided data is invalid.
9157
+ * NotFound: If the specified document embedding does not exist.
9158
+ * @returns RetrieverDocumentEmbedding
9159
9159
  * @throws ApiError
9160
9160
  */
9161
- static aiBotV1BotsBotCreate({
9161
+ static aiIndexOrgsUsersDocumentsUpdate({
9162
+ documentId,
9162
9163
  org,
9163
- requestBody
9164
+ userId,
9165
+ formData
9164
9166
  }) {
9165
9167
  return request(OpenAPI, {
9166
- method: 'POST',
9167
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9168
+ method: 'PUT',
9169
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9168
9170
  path: {
9169
- 'org': org
9171
+ 'document_id': documentId,
9172
+ 'org': org,
9173
+ 'user_id': userId
9170
9174
  },
9171
- body: requestBody,
9172
- mediaType: 'application/json'
9173
- });
9174
- }
9175
- /**
9176
- * Create slash commands for a specific bot
9177
- * eg. /iblai-baseline
9178
- * @returns BotCommand
9179
- * @throws ApiError
9180
- */
9181
- static aiBotV1BotsBotCommandsList({
9182
- org
9183
- }) {
9184
- return request(OpenAPI, {
9185
- method: 'GET',
9186
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9187
- path: {
9188
- 'org': org
9175
+ formData: formData,
9176
+ mediaType: 'multipart/form-data',
9177
+ errors: {
9178
+ 400: `Invalid request data`,
9179
+ 404: `Document not found`
9189
9180
  }
9190
9181
  });
9191
9182
  }
9192
9183
  /**
9193
- * Create slash commands for a specific bot
9194
- * eg. /iblai-baseline
9195
- * @returns BotCommand
9184
+ * Delete a specific document embedding.
9185
+ *
9186
+ * This endpoint removes a document embedding from the system,
9187
+ * including untraining it from any associated pathways.
9188
+ *
9189
+ * Args:
9190
+ * request: The HTTP request.
9191
+ * org: Organization key identifier.
9192
+ * document_id: The ID of the document embedding to delete.
9193
+ *
9194
+ * Returns:
9195
+ * Response: An empty response with a 204 status code if successful.
9196
+ *
9197
+ * Raises:
9198
+ * NotFound: If the specified document embedding does not exist.
9199
+ * @returns void
9196
9200
  * @throws ApiError
9197
9201
  */
9198
- static aiBotV1BotsBotCommandsCreate({
9202
+ static aiIndexOrgsUsersDocumentsDestroy({
9203
+ documentId,
9199
9204
  org,
9200
- requestBody
9205
+ userId
9201
9206
  }) {
9202
9207
  return request(OpenAPI, {
9203
- method: 'POST',
9204
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9208
+ method: 'DELETE',
9209
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9205
9210
  path: {
9206
- 'org': org
9211
+ 'document_id': documentId,
9212
+ 'org': org,
9213
+ 'user_id': userId
9207
9214
  },
9208
- body: requestBody,
9209
- mediaType: 'application/json'
9215
+ errors: {
9216
+ 404: `Document not found`
9217
+ }
9210
9218
  });
9211
9219
  }
9212
9220
  /**
9213
- * Create slash commands for a specific bot
9214
- * eg. /iblai-baseline
9215
- * @returns BotCommand
9221
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9222
+ * @returns DocumentSettingsResponse
9216
9223
  * @throws ApiError
9217
9224
  */
9218
- static aiBotV1BotsBotCommandsRetrieve({
9219
- id,
9220
- org
9225
+ static aiIndexOrgsUsersDocumentsSettingsRetrieve({
9226
+ documentId,
9227
+ org,
9228
+ userId
9221
9229
  }) {
9222
9230
  return request(OpenAPI, {
9223
9231
  method: 'GET',
9224
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9232
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
9225
9233
  path: {
9226
- 'id': id,
9227
- 'org': org
9234
+ 'document_id': documentId,
9235
+ 'org': org,
9236
+ 'user_id': userId
9228
9237
  }
9229
9238
  });
9230
9239
  }
9231
9240
  /**
9232
- * Create slash commands for a specific bot
9233
- * eg. /iblai-baseline
9234
- * @returns BotCommand
9241
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9242
+ * @returns DocumentSettingsResponse
9235
9243
  * @throws ApiError
9236
9244
  */
9237
- static aiBotV1BotsBotCommandsUpdate({
9238
- id,
9245
+ static aiIndexOrgsUsersDocumentsSettingsCreate({
9246
+ documentId,
9239
9247
  org,
9248
+ userId,
9240
9249
  requestBody
9241
9250
  }) {
9242
9251
  return request(OpenAPI, {
9243
- method: 'PUT',
9244
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9252
+ method: 'POST',
9253
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
9245
9254
  path: {
9246
- 'id': id,
9247
- 'org': org
9255
+ 'document_id': documentId,
9256
+ 'org': org,
9257
+ 'user_id': userId
9248
9258
  },
9249
9259
  body: requestBody,
9250
9260
  mediaType: 'application/json'
9251
9261
  });
9252
9262
  }
9253
9263
  /**
9254
- * Create slash commands for a specific bot
9255
- * eg. /iblai-baseline
9256
- * @returns BotCommand
9264
+ * Train a graph-based document through a worker process.
9265
+ *
9266
+ * This endpoint queues graph-based documents for training through a
9267
+ * specialized worker process that handles knowledge graph processing.
9268
+ *
9269
+ * Args:
9270
+ * request: The HTTP request containing the document information.
9271
+ * org: Organization key identifier.
9272
+ *
9273
+ * Returns:
9274
+ * Response: A confirmation that the document was queued for training,
9275
+ * including a task ID for tracking the progress.
9276
+ *
9277
+ * Raises:
9278
+ * ValidationError: If the request data is invalid.
9279
+ * BadRequest: If there was an error processing the document.
9280
+ * @returns TrainDocumentViewResponse
9257
9281
  * @throws ApiError
9258
9282
  */
9259
- static aiBotV1BotsBotCommandsPartialUpdate({
9260
- id,
9283
+ static aiIndexOrgsUsersDocumentsGraphTrainCreate({
9261
9284
  org,
9262
- requestBody
9285
+ userId,
9286
+ formData
9263
9287
  }) {
9264
9288
  return request(OpenAPI, {
9265
- method: 'PATCH',
9266
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9289
+ method: 'POST',
9290
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/graph-train/',
9267
9291
  path: {
9268
- 'id': id,
9269
- 'org': org
9292
+ 'org': org,
9293
+ 'user_id': userId
9270
9294
  },
9271
- body: requestBody,
9272
- mediaType: 'application/json'
9273
- });
9274
- }
9275
- /**
9276
- * Create slash commands for a specific bot
9277
- * eg. /iblai-baseline
9278
- * @returns void
9279
- * @throws ApiError
9280
- */
9281
- static aiBotV1BotsBotCommandsDestroy({
9282
- id,
9283
- org
9284
- }) {
9285
- return request(OpenAPI, {
9286
- method: 'DELETE',
9287
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9288
- path: {
9289
- 'id': id,
9290
- 'org': org
9295
+ formData: formData,
9296
+ mediaType: 'multipart/form-data',
9297
+ errors: {
9298
+ 400: `Invalid request data or document processing error`
9291
9299
  }
9292
9300
  });
9293
9301
  }
9294
9302
  /**
9295
- * Create modify and update bot information for a specific tenant.
9296
- * @returns Bot
9297
- * @throws ApiError
9298
- */
9299
- static aiBotV1BotsBotRetrieve({
9300
- id,
9301
- org
9303
+ * Description:
9304
+ * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
9305
+ *
9306
+ * Methods:
9307
+ * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
9308
+ *
9309
+ * Parameters:
9310
+ * - search (str): Search query to filter document names or URLs.
9311
+ * - offset (int): Offset number for pagination.
9312
+ * - limit (int): Limit number for pagination.
9313
+ *
9314
+ * Returns:
9315
+ * - GET: A paginated list of document embeddings with their details.
9316
+ * {
9317
+ * "count": 10,
9318
+ * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
9319
+ * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
9320
+ * "results": [
9321
+ * {
9322
+ * "document_name": "Document2",
9323
+ * "platform_key": "example_platform",
9324
+ * "pathway": "example_pathway"
9325
+ * }
9326
+ * ]
9327
+ * }
9328
+ *
9329
+ * Error Responses:
9330
+ * - 400 Bad Request: Invalid query parameters.
9331
+ * - 404 Not Found: No document embeddings found for the specified criteria.
9332
+ * @returns PaginatedRetrieverDocumentEmbeddingList
9333
+ * @throws ApiError
9334
+ */
9335
+ static aiIndexOrgsUsersDocumentsPathwaysList({
9336
+ org,
9337
+ pathway,
9338
+ userId,
9339
+ limit,
9340
+ offset,
9341
+ search
9302
9342
  }) {
9303
9343
  return request(OpenAPI, {
9304
9344
  method: 'GET',
9305
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9345
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
9306
9346
  path: {
9307
- 'id': id,
9308
- 'org': org
9347
+ 'org': org,
9348
+ 'pathway': pathway,
9349
+ 'user_id': userId
9350
+ },
9351
+ query: {
9352
+ 'limit': limit,
9353
+ 'offset': offset,
9354
+ 'search': search
9309
9355
  }
9310
9356
  });
9311
9357
  }
9312
9358
  /**
9313
- * Create modify and update bot information for a specific tenant.
9314
- * @returns BotCreate
9359
+ * Retrieve resource documents similar to the given query.
9360
+ *
9361
+ * This endpoint performs a semantic search to find documents that are
9362
+ * relevant to the provided query within the specified pathway.
9363
+ *
9364
+ * Args:
9365
+ * request: The HTTP request containing the search query.
9366
+ * org: Organization key identifier.
9367
+ *
9368
+ * Returns:
9369
+ * Response: A list of documents relevant to the search query.
9370
+ *
9371
+ * Raises:
9372
+ * ValidationError: If the request data is invalid.
9373
+ * @returns RetrieverResponseSearch
9315
9374
  * @throws ApiError
9316
9375
  */
9317
- static aiBotV1BotsBotUpdate({
9318
- id,
9376
+ static aiIndexOrgsUsersDocumentsSearchCreate({
9319
9377
  org,
9378
+ userId,
9320
9379
  requestBody
9321
9380
  }) {
9322
9381
  return request(OpenAPI, {
9323
- method: 'PUT',
9324
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9382
+ method: 'POST',
9383
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
9325
9384
  path: {
9326
- 'id': id,
9327
- 'org': org
9385
+ 'org': org,
9386
+ 'user_id': userId
9328
9387
  },
9329
9388
  body: requestBody,
9330
- mediaType: 'application/json'
9389
+ mediaType: 'application/json',
9390
+ errors: {
9391
+ 400: `Invalid request data`
9392
+ }
9331
9393
  });
9332
9394
  }
9333
9395
  /**
9334
- * Create modify and update bot information for a specific tenant.
9335
- * @returns BotCreate
9396
+ * Retrieve document sources related to a given query.
9397
+ *
9398
+ * This endpoint performs a semantic search to find document sources
9399
+ * that are relevant to the provided query within the specified pathway,
9400
+ * and returns them along with confidence levels.
9401
+ *
9402
+ * Args:
9403
+ * request: The HTTP request containing the search query.
9404
+ * org: Organization key identifier.
9405
+ *
9406
+ * Returns:
9407
+ * Response: A list of document sources with confidence levels.
9408
+ *
9409
+ * Raises:
9410
+ * ValidationError: If the request data is invalid.
9411
+ * @returns RetrieverRequestSearchDocument
9336
9412
  * @throws ApiError
9337
9413
  */
9338
- static aiBotV1BotsBotPartialUpdate({
9339
- id,
9414
+ static aiIndexOrgsUsersDocumentsSourcesCreate({
9340
9415
  org,
9416
+ userId,
9341
9417
  requestBody
9342
9418
  }) {
9343
9419
  return request(OpenAPI, {
9344
- method: 'PATCH',
9345
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9420
+ method: 'POST',
9421
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
9346
9422
  path: {
9347
- 'id': id,
9348
- 'org': org
9423
+ 'org': org,
9424
+ 'user_id': userId
9349
9425
  },
9350
9426
  body: requestBody,
9351
- mediaType: 'application/json'
9352
- });
9353
- }
9354
- /**
9355
- * Create modify and update bot information for a specific tenant.
9356
- * @returns void
9357
- * @throws ApiError
9358
- */
9359
- static aiBotV1BotsBotDestroy({
9360
- id,
9361
- org
9362
- }) {
9363
- return request(OpenAPI, {
9364
- method: 'DELETE',
9365
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9366
- path: {
9367
- 'id': id,
9368
- 'org': org
9427
+ mediaType: 'application/json',
9428
+ errors: {
9429
+ 400: `Invalid request data`
9369
9430
  }
9370
9431
  });
9371
9432
  }
9372
9433
  /**
9373
- * Create modify and update bot information for a specific tenant.
9374
- * @returns DiscordConfig
9434
+ * Check the status of a document training task.
9435
+ *
9436
+ * This endpoint retrieves the current status of an asynchronous
9437
+ * document training task that was previously initiated.
9438
+ *
9439
+ * Args:
9440
+ * request: The HTTP request.
9441
+ * org: Organization key identifier.
9442
+ * task_id: The ID of the training task to check.
9443
+ *
9444
+ * Returns:
9445
+ * Response: The current status of the document training task,
9446
+ * which can be "pending", "completed", or "failed".
9447
+ * @returns CheckDocumentTrainingStatus
9375
9448
  * @throws ApiError
9376
9449
  */
9377
- static aiBotV1BotsBotConfigDiscordRetrieve({
9378
- id,
9379
- org
9450
+ static aiIndexOrgsUsersDocumentsTasksRetrieve({
9451
+ org,
9452
+ taskId,
9453
+ userId
9380
9454
  }) {
9381
9455
  return request(OpenAPI, {
9382
9456
  method: 'GET',
9383
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9457
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
9384
9458
  path: {
9385
- 'id': id,
9386
- 'org': org
9459
+ 'org': org,
9460
+ 'task_id': taskId,
9461
+ 'user_id': userId
9387
9462
  }
9388
9463
  });
9389
9464
  }
9390
9465
  /**
9391
- * Create modify and update bot information for a specific tenant.
9392
- * @returns DiscordConfig
9466
+ * Train a document through a worker process.
9467
+ *
9468
+ * This endpoint queues larger documents for training through a worker
9469
+ * process, which is more suitable for handling documents that would
9470
+ * take too long to process directly.
9471
+ *
9472
+ * Args:
9473
+ * request: The HTTP request containing the document information.
9474
+ * org: Organization key identifier.
9475
+ *
9476
+ * Returns:
9477
+ * Response: A confirmation that the document was queued for training,
9478
+ * including a task ID for tracking the progress.
9479
+ *
9480
+ * Raises:
9481
+ * ValidationError: If the request data is invalid.
9482
+ * BadRequest: If there was an error processing the document.
9483
+ * @returns TrainDocumentViewResponse
9393
9484
  * @throws ApiError
9394
9485
  */
9395
- static aiBotV1BotsBotConfigDiscordPartialUpdate({
9396
- id,
9486
+ static aiIndexOrgsUsersDocumentsTrainCreate({
9397
9487
  org,
9398
- requestBody
9488
+ userId,
9489
+ formData
9399
9490
  }) {
9400
9491
  return request(OpenAPI, {
9401
- method: 'PATCH',
9402
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9492
+ method: 'POST',
9493
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
9403
9494
  path: {
9404
- 'id': id,
9405
- 'org': org
9495
+ 'org': org,
9496
+ 'user_id': userId
9406
9497
  },
9407
- body: requestBody,
9408
- mediaType: 'application/json'
9498
+ formData: formData,
9499
+ mediaType: 'multipart/form-data',
9500
+ errors: {
9501
+ 400: `Invalid request data`
9502
+ }
9409
9503
  });
9410
9504
  }
9411
9505
  /**
9412
- * Create modify and update bot information for a specific tenant.
9413
- * @returns SlackConfig
9506
+ * Train a document directly without using a worker.
9507
+ *
9508
+ * This endpoint is designed for training smaller documents directly
9509
+ * without queuing them through a worker process. For larger documents,
9510
+ * use the TrainDocumentView endpoint instead.
9511
+ *
9512
+ * Args:
9513
+ * request: The HTTP request containing the document information.
9514
+ * org: Organization key identifier.
9515
+ *
9516
+ * Returns:
9517
+ * Response: A confirmation that the document was trained successfully.
9518
+ *
9519
+ * Raises:
9520
+ * ValidationError: If the request data is invalid.
9521
+ * BadRequest: If the document training failed.
9522
+ * @returns RetreiverTrainViewResponse
9414
9523
  * @throws ApiError
9415
9524
  */
9416
- static aiBotV1BotsBotConfigSlackRetrieve({
9417
- id,
9418
- org
9525
+ static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
9526
+ org,
9527
+ userId,
9528
+ formData
9419
9529
  }) {
9420
9530
  return request(OpenAPI, {
9421
- method: 'GET',
9422
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/',
9531
+ method: 'POST',
9532
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
9423
9533
  path: {
9424
- 'id': id,
9425
- 'org': org
9534
+ 'org': org,
9535
+ 'user_id': userId
9536
+ },
9537
+ formData: formData,
9538
+ mediaType: 'multipart/form-data',
9539
+ errors: {
9540
+ 400: `Invalid request data or training failed`
9426
9541
  }
9427
9542
  });
9428
9543
  }
9429
9544
  /**
9430
- * Create modify and update bot information for a specific tenant.
9431
- * @returns SlackConfig
9432
- * @throws ApiError
9433
- */
9434
- static aiBotV1BotsBotConfigSlackUpdateCreate({
9435
- id,
9545
+ * Description:
9546
+ * Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
9547
+ * Process document for use in a specific chat session.
9548
+ * which will be processed and made available for the AI to reference
9549
+ * when responding to queries in that session.
9550
+ *
9551
+ * Methods:
9552
+ * - POST: Submits a document or media file for training within a specified chat session.
9553
+ *
9554
+ * Parameters:
9555
+ * - org (str):
9556
+ * - session_id (str): UUID of the chat session for which the document is being submitted.
9557
+ * - *args, **kwargs: Additional arguments.
9558
+ * - file (file): Multipart file input.
9559
+ *
9560
+ * Returns:
9561
+ * - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
9562
+ * {
9563
+ * "message": "File processed."
9564
+ * }
9565
+ *
9566
+ * Error Responses:
9567
+ * - 400 Bad Request:
9568
+ * - "File field is required" if the 'file' parameter is missing.
9569
+ * - "invalid file object" if the file object is not valid.
9570
+ * - Specific error message if an exception occurs while saving to Redis.
9571
+ * - 404 Not Found:
9572
+ * - "Session not found" if the provided session_id does not match any existing session.
9573
+ * - 413 Request Entity Too Large:
9574
+ * - "file is too large" including specific limits for document and media files if the file exceeds size limits.
9575
+ *
9576
+ * Access Control:
9577
+ * Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
9578
+ * @returns TrainChatSessionDocumentView
9579
+ * @throws ApiError
9580
+ */
9581
+ static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
9436
9582
  org,
9437
- requestBody
9583
+ sessionId,
9584
+ userId,
9585
+ formData
9438
9586
  }) {
9439
9587
  return request(OpenAPI, {
9440
9588
  method: 'POST',
9441
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9589
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
9442
9590
  path: {
9443
- 'id': id,
9444
- 'org': org
9591
+ 'org': org,
9592
+ 'session_id': sessionId,
9593
+ 'user_id': userId
9445
9594
  },
9446
- body: requestBody,
9447
- mediaType: 'application/json'
9595
+ formData: formData,
9596
+ mediaType: 'multipart/form-data',
9597
+ errors: {
9598
+ 400: `Invalid file or processing error`,
9599
+ 413: `File too large`
9600
+ }
9448
9601
  });
9449
9602
  }
9450
9603
  /**
9451
- * Create modify and update bot information for a specific tenant.
9452
- * @returns SlackConfig
9604
+ * Retrieve detailed information about a specific scraped resource.
9605
+ *
9606
+ * This endpoint returns the complete scraped data for a specific resource
9607
+ * identified by its ID.
9608
+ *
9609
+ * Args:
9610
+ * request: The HTTP request.
9611
+ * org: Organization key identifier.
9612
+ * user_id: The username of the user associated with the resource.
9613
+ * resource_id: The ID of the resource to retrieve.
9614
+ *
9615
+ * Returns:
9616
+ * Response: The complete scraped data for the specified resource.
9617
+ *
9618
+ * Raises:
9619
+ * NotFound: If the specified resource data does not exist.
9620
+ * @returns ResourceScrappedData
9453
9621
  * @throws ApiError
9454
9622
  */
9455
- static aiBotV1BotsBotConfigSlackUpdateUpdate({
9456
- id,
9623
+ static aiIndexOrgsUsersResourceDataScrappedRetrieve({
9457
9624
  org,
9458
- requestBody
9459
- }) {
9460
- return request(OpenAPI, {
9461
- method: 'PUT',
9462
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9463
- path: {
9464
- 'id': id,
9465
- 'org': org
9466
- },
9467
- body: requestBody,
9468
- mediaType: 'application/json'
9469
- });
9470
- }
9471
- /**
9472
- * Create modify and update bot information for a specific tenant.
9473
- * @returns SlackConfig
9474
- * @throws ApiError
9475
- */
9476
- static aiBotV1BotsBotConfigSlackUpdatePartialUpdate({
9477
- id,
9478
- org,
9479
- requestBody
9480
- }) {
9481
- return request(OpenAPI, {
9482
- method: 'PATCH',
9483
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9484
- path: {
9485
- 'id': id,
9486
- 'org': org
9487
- },
9488
- body: requestBody,
9489
- mediaType: 'application/json'
9490
- });
9491
- }
9492
- /**
9493
- * Create modify and update bot information for a specific tenant.
9494
- * @returns TeamsConfig
9495
- * @throws ApiError
9496
- */
9497
- static aiBotV1BotsBotConfigTeamsRetrieve({
9498
- id,
9499
- org
9500
- }) {
9501
- return request(OpenAPI, {
9502
- method: 'GET',
9503
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/',
9504
- path: {
9505
- 'id': id,
9506
- 'org': org
9507
- }
9508
- });
9509
- }
9510
- /**
9511
- * Create modify and update bot information for a specific tenant.
9512
- * @returns TeamsConfig
9513
- * @throws ApiError
9514
- */
9515
- static aiBotV1BotsBotConfigTeamsUpdateCreate({
9516
- id,
9517
- org,
9518
- requestBody
9519
- }) {
9520
- return request(OpenAPI, {
9521
- method: 'POST',
9522
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9523
- path: {
9524
- 'id': id,
9525
- 'org': org
9526
- },
9527
- body: requestBody,
9528
- mediaType: 'application/json'
9529
- });
9530
- }
9531
- /**
9532
- * Create modify and update bot information for a specific tenant.
9533
- * @returns TeamsConfig
9534
- * @throws ApiError
9535
- */
9536
- static aiBotV1BotsBotConfigTeamsUpdateUpdate({
9537
- id,
9538
- org,
9539
- requestBody
9540
- }) {
9541
- return request(OpenAPI, {
9542
- method: 'PUT',
9543
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9544
- path: {
9545
- 'id': id,
9546
- 'org': org
9547
- },
9548
- body: requestBody,
9549
- mediaType: 'application/json'
9550
- });
9551
- }
9552
- /**
9553
- * Create modify and update bot information for a specific tenant.
9554
- * @returns TeamsConfig
9555
- * @throws ApiError
9556
- */
9557
- static aiBotV1BotsBotConfigTeamsUpdatePartialUpdate({
9558
- id,
9559
- org,
9560
- requestBody
9561
- }) {
9562
- return request(OpenAPI, {
9563
- method: 'PATCH',
9564
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9565
- path: {
9566
- 'id': id,
9567
- 'org': org
9568
- },
9569
- body: requestBody,
9570
- mediaType: 'application/json'
9571
- });
9572
- }
9573
- /**
9574
- * Create modify and update bot information for a specific tenant.
9575
- * @returns WebexConfig
9576
- * @throws ApiError
9577
- */
9578
- static aiBotV1BotsBotConfigWebexRetrieve({
9579
- id,
9580
- org
9581
- }) {
9582
- return request(OpenAPI, {
9583
- method: 'GET',
9584
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9585
- path: {
9586
- 'id': id,
9587
- 'org': org
9588
- }
9589
- });
9590
- }
9591
- /**
9592
- * Create modify and update bot information for a specific tenant.
9593
- * @returns WebexConfig
9594
- * @throws ApiError
9595
- */
9596
- static aiBotV1BotsBotConfigWebexPartialUpdate({
9597
- id,
9598
- org,
9599
- requestBody
9600
- }) {
9601
- return request(OpenAPI, {
9602
- method: 'PATCH',
9603
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9604
- path: {
9605
- 'id': id,
9606
- 'org': org
9607
- },
9608
- body: requestBody,
9609
- mediaType: 'application/json'
9610
- });
9611
- }
9612
- /**
9613
- * Create modify and update bot information for a specific tenant.
9614
- * @returns WhatsappConfig
9615
- * @throws ApiError
9616
- */
9617
- static aiBotV1BotsBotConfigWhatsappRetrieve({
9618
- id,
9619
- org
9620
- }) {
9621
- return request(OpenAPI, {
9622
- method: 'GET',
9623
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/whatsapp/',
9624
- path: {
9625
- 'id': id,
9626
- 'org': org
9627
- }
9628
- });
9629
- }
9630
- /**
9631
- * Create modify and update bot information for a specific tenant.
9632
- * @returns WhatsappConfig
9633
- * @throws ApiError
9634
- */
9635
- static aiBotV1BotsBotWhatsappConfigUpdate({
9636
- id,
9637
- org,
9638
- requestBody
9639
- }) {
9640
- return request(OpenAPI, {
9641
- method: 'PUT',
9642
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9643
- path: {
9644
- 'id': id,
9645
- 'org': org
9646
- },
9647
- body: requestBody,
9648
- mediaType: 'application/json'
9649
- });
9650
- }
9651
- /**
9652
- * Create modify and update bot information for a specific tenant.
9653
- * @returns WhatsappConfig
9654
- * @throws ApiError
9655
- */
9656
- static aiBotV1BotsBotWhatsappConfigPartialUpdate({
9657
- id,
9658
- org,
9659
- requestBody
9660
- }) {
9661
- return request(OpenAPI, {
9662
- method: 'PATCH',
9663
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9664
- path: {
9665
- 'id': id,
9666
- 'org': org
9667
- },
9668
- body: requestBody,
9669
- mediaType: 'application/json'
9670
- });
9671
- }
9672
- /**
9673
- * Setup discord user id linkage with discord bots
9674
- * this will be used to authenticate the user when interracting with discord bots.
9675
- * the user id can be copied from the discord app after tapping on the user profile.
9676
- * @returns DiscordUserConfig
9677
- * @throws ApiError
9678
- */
9679
- static aiBotV1BotsDiscordUserConfigList({
9680
- org
9681
- }) {
9682
- return request(OpenAPI, {
9683
- method: 'GET',
9684
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9685
- path: {
9686
- 'org': org
9687
- }
9688
- });
9689
- }
9690
- /**
9691
- * Setup discord user id linkage with discord bots
9692
- * this will be used to authenticate the user when interracting with discord bots.
9693
- * the user id can be copied from the discord app after tapping on the user profile.
9694
- * @returns DiscordUserConfig
9695
- * @throws ApiError
9696
- */
9697
- static aiBotV1BotsDiscordUserConfigCreate({
9698
- org,
9699
- requestBody
9700
- }) {
9701
- return request(OpenAPI, {
9702
- method: 'POST',
9703
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9704
- path: {
9705
- 'org': org
9706
- },
9707
- body: requestBody,
9708
- mediaType: 'application/json'
9709
- });
9710
- }
9711
- /**
9712
- * Setup discord user id linkage with discord bots
9713
- * this will be used to authenticate the user when interracting with discord bots.
9714
- * the user id can be copied from the discord app after tapping on the user profile.
9715
- * @returns DiscordUserConfig
9716
- * @throws ApiError
9717
- */
9718
- static aiBotV1BotsDiscordUserConfigRetrieve({
9719
- id,
9720
- org
9721
- }) {
9722
- return request(OpenAPI, {
9723
- method: 'GET',
9724
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9725
- path: {
9726
- 'id': id,
9727
- 'org': org
9728
- }
9729
- });
9730
- }
9731
- /**
9732
- * Setup discord user id linkage with discord bots
9733
- * this will be used to authenticate the user when interracting with discord bots.
9734
- * the user id can be copied from the discord app after tapping on the user profile.
9735
- * @returns DiscordUserConfig
9736
- * @throws ApiError
9737
- */
9738
- static aiBotV1BotsDiscordUserConfigUpdate({
9739
- id,
9740
- org,
9741
- requestBody
9742
- }) {
9743
- return request(OpenAPI, {
9744
- method: 'PUT',
9745
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9746
- path: {
9747
- 'id': id,
9748
- 'org': org
9749
- },
9750
- body: requestBody,
9751
- mediaType: 'application/json'
9752
- });
9753
- }
9754
- /**
9755
- * Setup discord user id linkage with discord bots
9756
- * this will be used to authenticate the user when interracting with discord bots.
9757
- * the user id can be copied from the discord app after tapping on the user profile.
9758
- * @returns DiscordUserConfig
9759
- * @throws ApiError
9760
- */
9761
- static aiBotV1BotsDiscordUserConfigPartialUpdate({
9762
- id,
9763
- org,
9764
- requestBody
9765
- }) {
9766
- return request(OpenAPI, {
9767
- method: 'PATCH',
9768
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9769
- path: {
9770
- 'id': id,
9771
- 'org': org
9772
- },
9773
- body: requestBody,
9774
- mediaType: 'application/json'
9775
- });
9776
- }
9777
- /**
9778
- * Setup discord user id linkage with discord bots
9779
- * this will be used to authenticate the user when interracting with discord bots.
9780
- * the user id can be copied from the discord app after tapping on the user profile.
9781
- * @returns void
9782
- * @throws ApiError
9783
- */
9784
- static aiBotV1BotsDiscordUserConfigDestroy({
9785
- id,
9786
- org
9787
- }) {
9788
- return request(OpenAPI, {
9789
- method: 'DELETE',
9790
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9791
- path: {
9792
- 'id': id,
9793
- 'org': org
9794
- }
9795
- });
9796
- }
9797
- /**
9798
- * Setup slack username and domain linkage with slack bots
9799
- * this will be used to authenticate the user when interracting with slack bots.
9800
- * @returns SlackUserConfig
9801
- * @throws ApiError
9802
- */
9803
- static aiBotV1BotsSlackUserConfigList({
9804
- org
9805
- }) {
9806
- return request(OpenAPI, {
9807
- method: 'GET',
9808
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
9809
- path: {
9810
- 'org': org
9811
- }
9812
- });
9813
- }
9814
- /**
9815
- * Setup slack username and domain linkage with slack bots
9816
- * this will be used to authenticate the user when interracting with slack bots.
9817
- * @returns SlackUserConfig
9818
- * @throws ApiError
9819
- */
9820
- static aiBotV1BotsSlackUserConfigCreate({
9821
- org,
9822
- requestBody
9823
- }) {
9824
- return request(OpenAPI, {
9825
- method: 'POST',
9826
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
9827
- path: {
9828
- 'org': org
9829
- },
9830
- body: requestBody,
9831
- mediaType: 'application/json'
9832
- });
9833
- }
9834
- /**
9835
- * Setup slack username and domain linkage with slack bots
9836
- * this will be used to authenticate the user when interracting with slack bots.
9837
- * @returns SlackUserConfig
9838
- * @throws ApiError
9839
- */
9840
- static aiBotV1BotsSlackUserConfigRetrieve({
9841
- id,
9842
- org
9843
- }) {
9844
- return request(OpenAPI, {
9845
- method: 'GET',
9846
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9847
- path: {
9848
- 'id': id,
9849
- 'org': org
9850
- }
9851
- });
9852
- }
9853
- /**
9854
- * Setup slack username and domain linkage with slack bots
9855
- * this will be used to authenticate the user when interracting with slack bots.
9856
- * @returns SlackUserConfig
9857
- * @throws ApiError
9858
- */
9859
- static aiBotV1BotsSlackUserConfigUpdate({
9860
- id,
9861
- org,
9862
- requestBody
9863
- }) {
9864
- return request(OpenAPI, {
9865
- method: 'PUT',
9866
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9867
- path: {
9868
- 'id': id,
9869
- 'org': org
9870
- },
9871
- body: requestBody,
9872
- mediaType: 'application/json'
9873
- });
9874
- }
9875
- /**
9876
- * Setup slack username and domain linkage with slack bots
9877
- * this will be used to authenticate the user when interracting with slack bots.
9878
- * @returns SlackUserConfig
9879
- * @throws ApiError
9880
- */
9881
- static aiBotV1BotsSlackUserConfigPartialUpdate({
9882
- id,
9883
- org,
9884
- requestBody
9885
- }) {
9886
- return request(OpenAPI, {
9887
- method: 'PATCH',
9888
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9889
- path: {
9890
- 'id': id,
9891
- 'org': org
9892
- },
9893
- body: requestBody,
9894
- mediaType: 'application/json'
9895
- });
9896
- }
9897
- /**
9898
- * Setup slack username and domain linkage with slack bots
9899
- * this will be used to authenticate the user when interracting with slack bots.
9900
- * @returns void
9901
- * @throws ApiError
9902
- */
9903
- static aiBotV1BotsSlackUserConfigDestroy({
9904
- id,
9905
- org
9906
- }) {
9907
- return request(OpenAPI, {
9908
- method: 'DELETE',
9909
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9910
- path: {
9911
- 'id': id,
9912
- 'org': org
9913
- }
9914
- });
9915
- }
9916
- /**
9917
- * Setup phone number linkage with whatsapp bots
9918
- * This phone number will be used to authenticate and allow access to whatsapp bots.
9919
- * @returns WhatsappUserConfig
9920
- * @throws ApiError
9921
- */
9922
- static aiBotV1BotsWhatsappUserConfigList({
9923
- org
9924
- }) {
9925
- return request(OpenAPI, {
9926
- method: 'GET',
9927
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
9928
- path: {
9929
- 'org': org
9930
- }
9931
- });
9932
- }
9933
- /**
9934
- * Setup phone number linkage with whatsapp bots
9935
- * This phone number will be used to authenticate and allow access to whatsapp bots.
9936
- * @returns WhatsappUserConfig
9937
- * @throws ApiError
9938
- */
9939
- static aiBotV1BotsWhatsappUserConfigCreate({
9940
- org,
9941
- requestBody
9942
- }) {
9943
- return request(OpenAPI, {
9944
- method: 'POST',
9945
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
9946
- path: {
9947
- 'org': org
9948
- },
9949
- body: requestBody,
9950
- mediaType: 'application/json'
9951
- });
9952
- }
9953
- /**
9954
- * Setup phone number linkage with whatsapp bots
9955
- * This phone number will be used to authenticate and allow access to whatsapp bots.
9956
- * @returns WhatsappUserConfig
9957
- * @throws ApiError
9958
- */
9959
- static aiBotV1BotsWhatsappUserConfigRetrieve({
9960
- id,
9961
- org
9962
- }) {
9963
- return request(OpenAPI, {
9964
- method: 'GET',
9965
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
9966
- path: {
9967
- 'id': id,
9968
- 'org': org
9969
- }
9970
- });
9971
- }
9972
- /**
9973
- * Setup phone number linkage with whatsapp bots
9974
- * This phone number will be used to authenticate and allow access to whatsapp bots.
9975
- * @returns WhatsappUserConfig
9976
- * @throws ApiError
9977
- */
9978
- static aiBotV1BotsWhatsappUserConfigUpdate({
9979
- id,
9980
- org,
9981
- requestBody
9982
- }) {
9983
- return request(OpenAPI, {
9984
- method: 'PUT',
9985
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
9986
- path: {
9987
- 'id': id,
9988
- 'org': org
9989
- },
9990
- body: requestBody,
9991
- mediaType: 'application/json'
9992
- });
9993
- }
9994
- /**
9995
- * Setup phone number linkage with whatsapp bots
9996
- * This phone number will be used to authenticate and allow access to whatsapp bots.
9997
- * @returns WhatsappUserConfig
9998
- * @throws ApiError
9999
- */
10000
- static aiBotV1BotsWhatsappUserConfigPartialUpdate({
10001
- id,
10002
- org,
10003
- requestBody
10004
- }) {
10005
- return request(OpenAPI, {
10006
- method: 'PATCH',
10007
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10008
- path: {
10009
- 'id': id,
10010
- 'org': org
10011
- },
10012
- body: requestBody,
10013
- mediaType: 'application/json'
10014
- });
10015
- }
10016
- /**
10017
- * Setup phone number linkage with whatsapp bots
10018
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10019
- * @returns void
10020
- * @throws ApiError
10021
- */
10022
- static aiBotV1BotsWhatsappUserConfigDestroy({
10023
- id,
10024
- org
10025
- }) {
10026
- return request(OpenAPI, {
10027
- method: 'DELETE',
10028
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10029
- path: {
10030
- 'id': id,
10031
- 'org': org
10032
- }
10033
- });
10034
- }
10035
- /**
10036
- * Webhook endpoint to receive and process discord messages.
10037
- * @returns DiscordWebhook
10038
- * @throws ApiError
10039
- */
10040
- static aiBotV1BotsWebhooksDiscordCreate({
10041
- name,
10042
- org,
10043
- requestBody
10044
- }) {
10045
- return request(OpenAPI, {
10046
- method: 'POST',
10047
- url: '/api/ai-bot/v1/bots/webhooks/{org}/discord/{name}/',
10048
- path: {
10049
- 'name': name,
10050
- 'org': org
10051
- },
10052
- body: requestBody,
10053
- mediaType: 'application/json'
10054
- });
10055
- }
10056
- /**
10057
- * @returns SlackWebhook
10058
- * @throws ApiError
10059
- */
10060
- static aiBotV1BotsWebhooksSlackCreate({
10061
- name,
10062
- org,
10063
- requestBody
10064
- }) {
10065
- return request(OpenAPI, {
10066
- method: 'POST',
10067
- url: '/api/ai-bot/v1/bots/webhooks/{org}/slack/{name}/',
10068
- path: {
10069
- 'name': name,
10070
- 'org': org
10071
- },
10072
- body: requestBody,
10073
- mediaType: 'application/json'
10074
- });
10075
- }
10076
- /**
10077
- * @returns TeamsWebhook
10078
- * @throws ApiError
10079
- */
10080
- static aiBotV1BotsWebhooksTeamsCreate({
10081
- name,
10082
- org,
10083
- requestBody
10084
- }) {
10085
- return request(OpenAPI, {
10086
- method: 'POST',
10087
- url: '/api/ai-bot/v1/bots/webhooks/{org}/teams/{name}/',
10088
- path: {
10089
- 'name': name,
10090
- 'org': org
10091
- },
10092
- body: requestBody,
10093
- mediaType: 'application/json'
10094
- });
10095
- }
10096
- /**
10097
- * Webhook endpoint to receive and process discord messages.
10098
- * @returns WebexWebhook
10099
- * @throws ApiError
10100
- */
10101
- static aiBotV1BotsWebhooksWebexCreate({
10102
- name,
10103
- org,
10104
- requestBody
10105
- }) {
10106
- return request(OpenAPI, {
10107
- method: 'POST',
10108
- url: '/api/ai-bot/v1/bots/webhooks/{org}/webex/{name}/',
10109
- path: {
10110
- 'name': name,
10111
- 'org': org
10112
- },
10113
- body: requestBody,
10114
- mediaType: 'application/json'
10115
- });
10116
- }
10117
- /**
10118
- * Respond to whatsapp's webhook challenge.
10119
- * Parameters Required include the tenant key (org) and the name of the bot: (name)
10120
- * @returns WhatAppWebHook
10121
- * @throws ApiError
10122
- */
10123
- static aiBotV1BotsWebhooksWhatsappRetrieve({
10124
- name,
10125
- org
10126
- }) {
10127
- return request(OpenAPI, {
10128
- method: 'GET',
10129
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
10130
- path: {
10131
- 'name': name,
10132
- 'org': org
10133
- }
10134
- });
10135
- }
10136
- /**
10137
- * Accept and process webhook events from whatsapp.
10138
- * @returns WhatAppWebHook
10139
- * @throws ApiError
10140
- */
10141
- static aiBotV1BotsWebhooksWhatsappCreate({
10142
- name,
10143
- org,
10144
- requestBody
10145
- }) {
10146
- return request(OpenAPI, {
10147
- method: 'POST',
10148
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
10149
- path: {
10150
- 'name': name,
10151
- 'org': org
10152
- },
10153
- body: requestBody,
10154
- mediaType: 'application/json'
10155
- });
10156
- }
10157
- }
10158
-
10159
- class AiFinetuningService {
10160
- /**
10161
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10162
- * @returns PaginatedDataSetList
10163
- * @throws ApiError
10164
- */
10165
- static aiFinetuningV1OrgUserDatasetsList({
10166
- org,
10167
- username,
10168
- dateCreated,
10169
- numDataPoints,
10170
- ordering,
10171
- page,
10172
- pageSize,
10173
- retryAttempts,
10174
- search,
10175
- status
10176
- }) {
10177
- return request(OpenAPI, {
10178
- method: 'GET',
10179
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
10180
- path: {
10181
- 'org': org,
10182
- 'username': username
10183
- },
10184
- query: {
10185
- 'date_created': dateCreated,
10186
- 'num_data_points': numDataPoints,
10187
- 'ordering': ordering,
10188
- 'page': page,
10189
- 'page_size': pageSize,
10190
- 'retry_attempts': retryAttempts,
10191
- 'search': search,
10192
- 'status': status
10193
- }
10194
- });
10195
- }
10196
- /**
10197
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10198
- * @returns DataSetCreate
10199
- * @throws ApiError
10200
- */
10201
- static aiFinetuningV1OrgUserDatasetsCreate({
10202
- org,
10203
- username,
10204
- requestBody
10205
- }) {
10206
- return request(OpenAPI, {
10207
- method: 'POST',
10208
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
10209
- path: {
10210
- 'org': org,
10211
- 'username': username
10212
- },
10213
- body: requestBody,
10214
- mediaType: 'application/json'
10215
- });
10216
- }
10217
- /**
10218
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10219
- * @returns DataSet
10220
- * @throws ApiError
10221
- */
10222
- static aiFinetuningV1OrgUserDatasetsRetrieve({
10223
- id,
10224
- org,
10225
- username
10226
- }) {
10227
- return request(OpenAPI, {
10228
- method: 'GET',
10229
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10230
- path: {
10231
- 'id': id,
10232
- 'org': org,
10233
- 'username': username
10234
- }
10235
- });
10236
- }
10237
- /**
10238
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10239
- * @returns DataSet
10240
- * @throws ApiError
10241
- */
10242
- static aiFinetuningV1OrgUserDatasetsUpdate({
10243
- id,
10244
- org,
10245
- username,
10246
- requestBody
10247
- }) {
10248
- return request(OpenAPI, {
10249
- method: 'PUT',
10250
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10251
- path: {
10252
- 'id': id,
10253
- 'org': org,
10254
- 'username': username
10255
- },
10256
- body: requestBody,
10257
- mediaType: 'application/json'
10258
- });
10259
- }
10260
- /**
10261
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10262
- * @returns DataSet
10263
- * @throws ApiError
10264
- */
10265
- static aiFinetuningV1OrgUserDatasetsPartialUpdate({
10266
- id,
10267
- org,
10268
- username,
10269
- requestBody
10270
- }) {
10271
- return request(OpenAPI, {
10272
- method: 'PATCH',
10273
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10274
- path: {
10275
- 'id': id,
10276
- 'org': org,
10277
- 'username': username
10278
- },
10279
- body: requestBody,
10280
- mediaType: 'application/json'
10281
- });
10282
- }
10283
- /**
10284
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10285
- * @returns void
10286
- * @throws ApiError
10287
- */
10288
- static aiFinetuningV1OrgUserDatasetsDestroy({
10289
- id,
10290
- org,
10291
- username
10292
- }) {
10293
- return request(OpenAPI, {
10294
- method: 'DELETE',
10295
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10296
- path: {
10297
- 'id': id,
10298
- 'org': org,
10299
- 'username': username
10300
- }
10301
- });
10302
- }
10303
- /**
10304
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10305
- * @returns PaginatedTrainingList
10306
- * @throws ApiError
10307
- */
10308
- static aiFinetuningV1OrgUserTrainingsList({
10309
- org,
10310
- username,
10311
- baseModelName,
10312
- dataset,
10313
- dateCreated,
10314
- fineTunedModel,
10315
- lastModified,
10316
- ordering,
10317
- page,
10318
- pageSize,
10319
- preprocessDataset,
10320
- provider,
10321
- search,
10322
- status
10323
- }) {
10324
- return request(OpenAPI, {
10325
- method: 'GET',
10326
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
10327
- path: {
10328
- 'org': org,
10329
- 'username': username
10330
- },
10331
- query: {
10332
- 'base_model_name': baseModelName,
10333
- 'dataset': dataset,
10334
- 'date_created': dateCreated,
10335
- 'fine_tuned_model': fineTunedModel,
10336
- 'last_modified': lastModified,
10337
- 'ordering': ordering,
10338
- 'page': page,
10339
- 'page_size': pageSize,
10340
- 'preprocess_dataset': preprocessDataset,
10341
- 'provider': provider,
10342
- 'search': search,
10343
- 'status': status
10344
- }
10345
- });
10346
- }
10347
- /**
10348
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10349
- * @returns TrainingCreate
10350
- * @throws ApiError
10351
- */
10352
- static aiFinetuningV1OrgUserTrainingsCreate({
10353
- org,
10354
- username,
10355
- requestBody
10356
- }) {
10357
- return request(OpenAPI, {
10358
- method: 'POST',
10359
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
10360
- path: {
10361
- 'org': org,
10362
- 'username': username
10363
- },
10364
- body: requestBody,
10365
- mediaType: 'application/json'
10366
- });
10367
- }
10368
- /**
10369
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10370
- * @returns Training
10371
- * @throws ApiError
10372
- */
10373
- static aiFinetuningV1OrgUserTrainingsRetrieve({
10374
- id,
10375
- org,
10376
- username
10377
- }) {
10378
- return request(OpenAPI, {
10379
- method: 'GET',
10380
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10381
- path: {
10382
- 'id': id,
10383
- 'org': org,
10384
- 'username': username
10385
- }
10386
- });
10387
- }
10388
- /**
10389
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10390
- * @returns TrainingCreate
10391
- * @throws ApiError
10392
- */
10393
- static aiFinetuningV1OrgUserTrainingsUpdate({
10394
- id,
10395
- org,
10396
- username,
10397
- requestBody
10398
- }) {
10399
- return request(OpenAPI, {
10400
- method: 'PUT',
10401
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10402
- path: {
10403
- 'id': id,
10404
- 'org': org,
10405
- 'username': username
10406
- },
10407
- body: requestBody,
10408
- mediaType: 'application/json'
10409
- });
10410
- }
10411
- /**
10412
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10413
- * @returns TrainingCreate
10414
- * @throws ApiError
10415
- */
10416
- static aiFinetuningV1OrgUserTrainingsPartialUpdate({
10417
- id,
10418
- org,
10419
- username,
10420
- requestBody
10421
- }) {
10422
- return request(OpenAPI, {
10423
- method: 'PATCH',
10424
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10425
- path: {
10426
- 'id': id,
10427
- 'org': org,
10428
- 'username': username
10429
- },
10430
- body: requestBody,
10431
- mediaType: 'application/json'
10432
- });
10433
- }
10434
- /**
10435
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10436
- * @returns void
10437
- * @throws ApiError
10438
- */
10439
- static aiFinetuningV1OrgUserTrainingsDestroy({
10440
- id,
10441
- org,
10442
- username
10443
- }) {
10444
- return request(OpenAPI, {
10445
- method: 'DELETE',
10446
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10447
- path: {
10448
- 'id': id,
10449
- 'org': org,
10450
- 'username': username
10451
- }
10452
- });
10453
- }
10454
- /**
10455
- * Retrieves a paginated list of completed fine-tuned models, excluding those without a fine-tuned model.
10456
- * Filtering and pagination is allowed.
10457
- *
10458
- * NB: This is only a helper endpoint. The same functionality can be achieved with the appropriate filters using the
10459
- * training list endpoint.
10460
- * Returns:
10461
- * Response: A paginated response containing the serialized fine-tuned models.
10462
- * @returns Training
10463
- * @throws ApiError
10464
- */
10465
- static aiFinetuningV1OrgUserTrainingsFinetunedModelsRetrieve({
10466
- org,
10467
- username
10468
- }) {
10469
- return request(OpenAPI, {
10470
- method: 'GET',
10471
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/finetuned-models/',
10472
- path: {
10473
- 'org': org,
10474
- 'username': username
10475
- }
10476
- });
10477
- }
10478
- }
10479
-
10480
- class AiIndexService {
10481
- /**
10482
- * Retrieve details of a specific document embedding.
10483
- *
10484
- * This endpoint returns detailed information about a specific
10485
- * document embedding identified by its ID.
10486
- *
10487
- * Args:
10488
- * request: The HTTP request.
10489
- * org: Organization key identifier.
10490
- * document_id: The ID of the document embedding to retrieve.
10491
- *
10492
- * Returns:
10493
- * Response: Detailed information about the document embedding.
10494
- *
10495
- * Raises:
10496
- * NotFound: If the specified document embedding does not exist.
10497
- * @returns RetrieverDocumentEmbedding
10498
- * @throws ApiError
10499
- */
10500
- static aiIndexOrgsUsersDocumentsRetrieve({
10501
- documentId,
10502
- org,
10503
- userId
10504
- }) {
10505
- return request(OpenAPI, {
10506
- method: 'GET',
10507
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10508
- path: {
10509
- 'document_id': documentId,
10510
- 'org': org,
10511
- 'user_id': userId
10512
- },
10513
- errors: {
10514
- 404: `Document not found`
10515
- }
10516
- });
10517
- }
10518
- /**
10519
- * Update a specific document embedding.
10520
- *
10521
- * This endpoint allows updating various properties of a document embedding,
10522
- * including its name, type, pathway, and training status.
10523
- *
10524
- * Args:
10525
- * request: The HTTP request containing the updated document data.
10526
- * org: Organization key identifier.
10527
- * document_id: The ID of the document embedding to update.
10528
- *
10529
- * Returns:
10530
- * Response: The updated document embedding information.
10531
- *
10532
- * Raises:
10533
- * BadRequest: If the provided data is invalid.
10534
- * NotFound: If the specified document embedding does not exist.
10535
- * @returns RetrieverDocumentEmbedding
10536
- * @throws ApiError
10537
- */
10538
- static aiIndexOrgsUsersDocumentsUpdate({
10539
- documentId,
10540
- org,
10541
- userId,
10542
- formData
10543
- }) {
10544
- return request(OpenAPI, {
10545
- method: 'PUT',
10546
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10547
- path: {
10548
- 'document_id': documentId,
10549
- 'org': org,
10550
- 'user_id': userId
10551
- },
10552
- formData: formData,
10553
- mediaType: 'multipart/form-data',
10554
- errors: {
10555
- 400: `Invalid request data`,
10556
- 404: `Document not found`
10557
- }
10558
- });
10559
- }
10560
- /**
10561
- * Delete a specific document embedding.
10562
- *
10563
- * This endpoint removes a document embedding from the system,
10564
- * including untraining it from any associated pathways.
10565
- *
10566
- * Args:
10567
- * request: The HTTP request.
10568
- * org: Organization key identifier.
10569
- * document_id: The ID of the document embedding to delete.
10570
- *
10571
- * Returns:
10572
- * Response: An empty response with a 204 status code if successful.
10573
- *
10574
- * Raises:
10575
- * NotFound: If the specified document embedding does not exist.
10576
- * @returns void
10577
- * @throws ApiError
10578
- */
10579
- static aiIndexOrgsUsersDocumentsDestroy({
10580
- documentId,
10581
- org,
10582
- userId
10583
- }) {
10584
- return request(OpenAPI, {
10585
- method: 'DELETE',
10586
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10587
- path: {
10588
- 'document_id': documentId,
10589
- 'org': org,
10590
- 'user_id': userId
10591
- },
10592
- errors: {
10593
- 404: `Document not found`
10594
- }
10595
- });
10596
- }
10597
- /**
10598
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10599
- * @returns DocumentSettingsResponse
10600
- * @throws ApiError
10601
- */
10602
- static aiIndexOrgsUsersDocumentsSettingsRetrieve({
10603
- documentId,
10604
- org,
10605
- userId
10606
- }) {
10607
- return request(OpenAPI, {
10608
- method: 'GET',
10609
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
10610
- path: {
10611
- 'document_id': documentId,
10612
- 'org': org,
10613
- 'user_id': userId
10614
- }
10615
- });
10616
- }
10617
- /**
10618
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10619
- * @returns DocumentSettingsResponse
10620
- * @throws ApiError
10621
- */
10622
- static aiIndexOrgsUsersDocumentsSettingsCreate({
10623
- documentId,
10624
- org,
10625
- userId,
10626
- requestBody
10627
- }) {
10628
- return request(OpenAPI, {
10629
- method: 'POST',
10630
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
10631
- path: {
10632
- 'document_id': documentId,
10633
- 'org': org,
10634
- 'user_id': userId
10635
- },
10636
- body: requestBody,
10637
- mediaType: 'application/json'
10638
- });
10639
- }
10640
- /**
10641
- * Train a graph-based document through a worker process.
10642
- *
10643
- * This endpoint queues graph-based documents for training through a
10644
- * specialized worker process that handles knowledge graph processing.
10645
- *
10646
- * Args:
10647
- * request: The HTTP request containing the document information.
10648
- * org: Organization key identifier.
10649
- *
10650
- * Returns:
10651
- * Response: A confirmation that the document was queued for training,
10652
- * including a task ID for tracking the progress.
10653
- *
10654
- * Raises:
10655
- * ValidationError: If the request data is invalid.
10656
- * BadRequest: If there was an error processing the document.
10657
- * @returns TrainDocumentViewResponse
10658
- * @throws ApiError
10659
- */
10660
- static aiIndexOrgsUsersDocumentsGraphTrainCreate({
10661
- org,
10662
- userId,
10663
- formData
10664
- }) {
10665
- return request(OpenAPI, {
10666
- method: 'POST',
10667
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/graph-train/',
10668
- path: {
10669
- 'org': org,
10670
- 'user_id': userId
10671
- },
10672
- formData: formData,
10673
- mediaType: 'multipart/form-data',
10674
- errors: {
10675
- 400: `Invalid request data or document processing error`
10676
- }
10677
- });
10678
- }
10679
- /**
10680
- * Description:
10681
- * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
10682
- *
10683
- * Methods:
10684
- * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
10685
- *
10686
- * Parameters:
10687
- * - search (str): Search query to filter document names or URLs.
10688
- * - offset (int): Offset number for pagination.
10689
- * - limit (int): Limit number for pagination.
10690
- *
10691
- * Returns:
10692
- * - GET: A paginated list of document embeddings with their details.
10693
- * {
10694
- * "count": 10,
10695
- * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
10696
- * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
10697
- * "results": [
10698
- * {
10699
- * "document_name": "Document2",
10700
- * "platform_key": "example_platform",
10701
- * "pathway": "example_pathway"
10702
- * }
10703
- * ]
10704
- * }
10705
- *
10706
- * Error Responses:
10707
- * - 400 Bad Request: Invalid query parameters.
10708
- * - 404 Not Found: No document embeddings found for the specified criteria.
10709
- * @returns PaginatedRetrieverDocumentEmbeddingList
10710
- * @throws ApiError
10711
- */
10712
- static aiIndexOrgsUsersDocumentsPathwaysList({
10713
- org,
10714
- pathway,
10715
- userId,
10716
- limit,
10717
- offset,
10718
- search
10719
- }) {
10720
- return request(OpenAPI, {
10721
- method: 'GET',
10722
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
10723
- path: {
10724
- 'org': org,
10725
- 'pathway': pathway,
10726
- 'user_id': userId
10727
- },
10728
- query: {
10729
- 'limit': limit,
10730
- 'offset': offset,
10731
- 'search': search
10732
- }
10733
- });
10734
- }
10735
- /**
10736
- * Retrieve resource documents similar to the given query.
10737
- *
10738
- * This endpoint performs a semantic search to find documents that are
10739
- * relevant to the provided query within the specified pathway.
10740
- *
10741
- * Args:
10742
- * request: The HTTP request containing the search query.
10743
- * org: Organization key identifier.
10744
- *
10745
- * Returns:
10746
- * Response: A list of documents relevant to the search query.
10747
- *
10748
- * Raises:
10749
- * ValidationError: If the request data is invalid.
10750
- * @returns RetrieverResponseSearch
10751
- * @throws ApiError
10752
- */
10753
- static aiIndexOrgsUsersDocumentsSearchCreate({
10754
- org,
10755
- userId,
10756
- requestBody
10757
- }) {
10758
- return request(OpenAPI, {
10759
- method: 'POST',
10760
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
10761
- path: {
10762
- 'org': org,
10763
- 'user_id': userId
10764
- },
10765
- body: requestBody,
10766
- mediaType: 'application/json',
10767
- errors: {
10768
- 400: `Invalid request data`
10769
- }
10770
- });
10771
- }
10772
- /**
10773
- * Retrieve document sources related to a given query.
10774
- *
10775
- * This endpoint performs a semantic search to find document sources
10776
- * that are relevant to the provided query within the specified pathway,
10777
- * and returns them along with confidence levels.
10778
- *
10779
- * Args:
10780
- * request: The HTTP request containing the search query.
10781
- * org: Organization key identifier.
10782
- *
10783
- * Returns:
10784
- * Response: A list of document sources with confidence levels.
10785
- *
10786
- * Raises:
10787
- * ValidationError: If the request data is invalid.
10788
- * @returns RetrieverRequestSearchDocument
10789
- * @throws ApiError
10790
- */
10791
- static aiIndexOrgsUsersDocumentsSourcesCreate({
10792
- org,
10793
- userId,
10794
- requestBody
10795
- }) {
10796
- return request(OpenAPI, {
10797
- method: 'POST',
10798
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
10799
- path: {
10800
- 'org': org,
10801
- 'user_id': userId
10802
- },
10803
- body: requestBody,
10804
- mediaType: 'application/json',
10805
- errors: {
10806
- 400: `Invalid request data`
10807
- }
10808
- });
10809
- }
10810
- /**
10811
- * Check the status of a document training task.
10812
- *
10813
- * This endpoint retrieves the current status of an asynchronous
10814
- * document training task that was previously initiated.
10815
- *
10816
- * Args:
10817
- * request: The HTTP request.
10818
- * org: Organization key identifier.
10819
- * task_id: The ID of the training task to check.
10820
- *
10821
- * Returns:
10822
- * Response: The current status of the document training task,
10823
- * which can be "pending", "completed", or "failed".
10824
- * @returns CheckDocumentTrainingStatus
10825
- * @throws ApiError
10826
- */
10827
- static aiIndexOrgsUsersDocumentsTasksRetrieve({
10828
- org,
10829
- taskId,
10830
- userId
10831
- }) {
10832
- return request(OpenAPI, {
10833
- method: 'GET',
10834
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
10835
- path: {
10836
- 'org': org,
10837
- 'task_id': taskId,
10838
- 'user_id': userId
10839
- }
10840
- });
10841
- }
10842
- /**
10843
- * Train a document through a worker process.
10844
- *
10845
- * This endpoint queues larger documents for training through a worker
10846
- * process, which is more suitable for handling documents that would
10847
- * take too long to process directly.
10848
- *
10849
- * Args:
10850
- * request: The HTTP request containing the document information.
10851
- * org: Organization key identifier.
10852
- *
10853
- * Returns:
10854
- * Response: A confirmation that the document was queued for training,
10855
- * including a task ID for tracking the progress.
10856
- *
10857
- * Raises:
10858
- * ValidationError: If the request data is invalid.
10859
- * BadRequest: If there was an error processing the document.
10860
- * @returns TrainDocumentViewResponse
10861
- * @throws ApiError
10862
- */
10863
- static aiIndexOrgsUsersDocumentsTrainCreate({
10864
- org,
10865
- userId,
10866
- formData
10867
- }) {
10868
- return request(OpenAPI, {
10869
- method: 'POST',
10870
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
10871
- path: {
10872
- 'org': org,
10873
- 'user_id': userId
10874
- },
10875
- formData: formData,
10876
- mediaType: 'multipart/form-data',
10877
- errors: {
10878
- 400: `Invalid request data`
10879
- }
10880
- });
10881
- }
10882
- /**
10883
- * Train a document directly without using a worker.
10884
- *
10885
- * This endpoint is designed for training smaller documents directly
10886
- * without queuing them through a worker process. For larger documents,
10887
- * use the TrainDocumentView endpoint instead.
10888
- *
10889
- * Args:
10890
- * request: The HTTP request containing the document information.
10891
- * org: Organization key identifier.
10892
- *
10893
- * Returns:
10894
- * Response: A confirmation that the document was trained successfully.
10895
- *
10896
- * Raises:
10897
- * ValidationError: If the request data is invalid.
10898
- * BadRequest: If the document training failed.
10899
- * @returns RetreiverTrainViewResponse
10900
- * @throws ApiError
10901
- */
10902
- static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
10903
- org,
10904
- userId,
10905
- formData
10906
- }) {
10907
- return request(OpenAPI, {
10908
- method: 'POST',
10909
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
10910
- path: {
10911
- 'org': org,
10912
- 'user_id': userId
10913
- },
10914
- formData: formData,
10915
- mediaType: 'multipart/form-data',
10916
- errors: {
10917
- 400: `Invalid request data or training failed`
10918
- }
10919
- });
10920
- }
10921
- /**
10922
- * Description:
10923
- * Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
10924
- * Process document for use in a specific chat session.
10925
- * which will be processed and made available for the AI to reference
10926
- * when responding to queries in that session.
10927
- *
10928
- * Methods:
10929
- * - POST: Submits a document or media file for training within a specified chat session.
10930
- *
10931
- * Parameters:
10932
- * - org (str):
10933
- * - session_id (str): UUID of the chat session for which the document is being submitted.
10934
- * - *args, **kwargs: Additional arguments.
10935
- * - file (file): Multipart file input.
10936
- *
10937
- * Returns:
10938
- * - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
10939
- * {
10940
- * "message": "File processed."
10941
- * }
10942
- *
10943
- * Error Responses:
10944
- * - 400 Bad Request:
10945
- * - "File field is required" if the 'file' parameter is missing.
10946
- * - "invalid file object" if the file object is not valid.
10947
- * - Specific error message if an exception occurs while saving to Redis.
10948
- * - 404 Not Found:
10949
- * - "Session not found" if the provided session_id does not match any existing session.
10950
- * - 413 Request Entity Too Large:
10951
- * - "file is too large" including specific limits for document and media files if the file exceeds size limits.
10952
- *
10953
- * Access Control:
10954
- * Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
10955
- * @returns TrainChatSessionDocumentView
10956
- * @throws ApiError
10957
- */
10958
- static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
10959
- org,
10960
- sessionId,
10961
- userId,
10962
- formData
10963
- }) {
10964
- return request(OpenAPI, {
10965
- method: 'POST',
10966
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
10967
- path: {
10968
- 'org': org,
10969
- 'session_id': sessionId,
10970
- 'user_id': userId
10971
- },
10972
- formData: formData,
10973
- mediaType: 'multipart/form-data',
10974
- errors: {
10975
- 400: `Invalid file or processing error`,
10976
- 413: `File too large`
10977
- }
10978
- });
10979
- }
10980
- /**
10981
- * Retrieve detailed information about a specific scraped resource.
10982
- *
10983
- * This endpoint returns the complete scraped data for a specific resource
10984
- * identified by its ID.
10985
- *
10986
- * Args:
10987
- * request: The HTTP request.
10988
- * org: Organization key identifier.
10989
- * user_id: The username of the user associated with the resource.
10990
- * resource_id: The ID of the resource to retrieve.
10991
- *
10992
- * Returns:
10993
- * Response: The complete scraped data for the specified resource.
10994
- *
10995
- * Raises:
10996
- * NotFound: If the specified resource data does not exist.
10997
- * @returns ResourceScrappedData
10998
- * @throws ApiError
10999
- */
11000
- static aiIndexOrgsUsersResourceDataScrappedRetrieve({
11001
- org,
11002
- resourceId,
11003
- userId
9625
+ resourceId,
9626
+ userId
11004
9627
  }) {
11005
9628
  return request(OpenAPI, {
11006
9629
  method: 'GET',
@@ -11856,7 +10479,6 @@
11856
10479
  }
11857
10480
  /**
11858
10481
  * Create a new mentor.
11859
- *
11860
10482
  * Body Parameters:
11861
10483
  * - name: Mentor name.
11862
10484
  * - unique_id: Unique identifier.
@@ -15457,29 +14079,6 @@
15457
14079
  }
15458
14080
  });
15459
14081
  }
15460
- /**
15461
- * View to create a mentor from a template
15462
- *
15463
- * Accessible to only tenant admins.
15464
- * @returns Mentor
15465
- * @throws ApiError
15466
- */
15467
- static aiMentorOrgsUsersMentorFromTemplateCreate({
15468
- org,
15469
- userId,
15470
- requestBody
15471
- }) {
15472
- return request(OpenAPI, {
15473
- method: 'POST',
15474
- url: '/api/ai-mentor/orgs/{org}/users/{user_id}/mentor-from-template/',
15475
- path: {
15476
- 'org': org,
15477
- 'user_id': userId
15478
- },
15479
- body: requestBody,
15480
- mediaType: 'application/json'
15481
- });
15482
- }
15483
14082
  /**
15484
14083
  * Retrieve available LLMs for a user.
15485
14084
  * @returns LLMResponse
@@ -35032,8 +33631,6 @@
35032
33631
 
35033
33632
  exports.AiAccountService = AiAccountService;
35034
33633
  exports.AiAnalyticsService = AiAnalyticsService;
35035
- exports.AiBotService = AiBotService;
35036
- exports.AiFinetuningService = AiFinetuningService;
35037
33634
  exports.AiIndexService = AiIndexService;
35038
33635
  exports.AiMarketingService = AiMarketingService;
35039
33636
  exports.AiMediaService = AiMediaService;