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