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