@iblai/iblai-api 4.6.1-ai-plus → 4.6.2-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 (91) hide show
  1. package/dist/index.cjs.js +408 -1757
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +409 -1756
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +408 -1757
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +1 -39
  8. package/dist/types/models/AutoMemoryPrompt.d.ts +4 -0
  9. package/dist/types/services/AiMentorService.d.ts +21 -0
  10. package/package.json +1 -1
  11. package/src/core/OpenAPI.ts +1 -1
  12. package/src/index.ts +1 -39
  13. package/src/models/{WhatAppWebHook.ts → AutoMemoryPrompt.ts} +3 -2
  14. package/src/services/AiMentorService.ts +54 -0
  15. package/dist/types/models/Bot.d.ts +0 -15
  16. package/dist/types/models/BotCommand.d.ts +0 -6
  17. package/dist/types/models/BotCreate.d.ts +0 -12
  18. package/dist/types/models/DataSet.d.ts +0 -21
  19. package/dist/types/models/DataSetCreate.d.ts +0 -12
  20. package/dist/types/models/DataSetStatusEnum.d.ts +0 -12
  21. package/dist/types/models/DiscordConfig.d.ts +0 -7
  22. package/dist/types/models/DiscordUserConfig.d.ts +0 -10
  23. package/dist/types/models/DiscordWebhook.d.ts +0 -6
  24. package/dist/types/models/PaginatedDataSetList.d.ts +0 -7
  25. package/dist/types/models/PaginatedTrainingList.d.ts +0 -7
  26. package/dist/types/models/PatchedBotCommand.d.ts +0 -6
  27. package/dist/types/models/PatchedBotCreate.d.ts +0 -12
  28. package/dist/types/models/PatchedDataSet.d.ts +0 -21
  29. package/dist/types/models/PatchedDiscordConfig.d.ts +0 -7
  30. package/dist/types/models/PatchedDiscordUserConfig.d.ts +0 -10
  31. package/dist/types/models/PatchedSlackConfig.d.ts +0 -8
  32. package/dist/types/models/PatchedSlackUserConfig.d.ts +0 -17
  33. package/dist/types/models/PatchedTeamsConfig.d.ts +0 -7
  34. package/dist/types/models/PatchedTrainingCreate.d.ts +0 -31
  35. package/dist/types/models/PatchedWebexConfig.d.ts +0 -10
  36. package/dist/types/models/PatchedWhatsappConfig.d.ts +0 -11
  37. package/dist/types/models/PatchedWhatsappUserConfig.d.ts +0 -10
  38. package/dist/types/models/Provider05cEnum.d.ts +0 -14
  39. package/dist/types/models/Provider63aEnum.d.ts +0 -6
  40. package/dist/types/models/SlackConfig.d.ts +0 -8
  41. package/dist/types/models/SlackUserConfig.d.ts +0 -17
  42. package/dist/types/models/SlackWebhook.d.ts +0 -6
  43. package/dist/types/models/TeamsConfig.d.ts +0 -7
  44. package/dist/types/models/TeamsWebhook.d.ts +0 -17
  45. package/dist/types/models/Training.d.ts +0 -41
  46. package/dist/types/models/TrainingCreate.d.ts +0 -31
  47. package/dist/types/models/WebexConfig.d.ts +0 -10
  48. package/dist/types/models/WebexWebhook.d.ts +0 -4
  49. package/dist/types/models/WhatAppWebHook.d.ts +0 -3
  50. package/dist/types/models/WhatsappConfig.d.ts +0 -11
  51. package/dist/types/models/WhatsappUserConfig.d.ts +0 -10
  52. package/dist/types/services/AiBotService.d.ts +0 -642
  53. package/dist/types/services/AiFinetuningService.d.ts +0 -232
  54. package/src/models/Bot.ts +0 -20
  55. package/src/models/BotCommand.ts +0 -11
  56. package/src/models/BotCreate.ts +0 -17
  57. package/src/models/DataSet.ts +0 -26
  58. package/src/models/DataSetCreate.ts +0 -17
  59. package/src/models/DataSetStatusEnum.ts +0 -16
  60. package/src/models/DiscordConfig.ts +0 -12
  61. package/src/models/DiscordUserConfig.ts +0 -15
  62. package/src/models/DiscordWebhook.ts +0 -11
  63. package/src/models/PaginatedDataSetList.ts +0 -12
  64. package/src/models/PaginatedTrainingList.ts +0 -12
  65. package/src/models/PatchedBotCommand.ts +0 -11
  66. package/src/models/PatchedBotCreate.ts +0 -17
  67. package/src/models/PatchedDataSet.ts +0 -26
  68. package/src/models/PatchedDiscordConfig.ts +0 -12
  69. package/src/models/PatchedDiscordUserConfig.ts +0 -15
  70. package/src/models/PatchedSlackConfig.ts +0 -13
  71. package/src/models/PatchedSlackUserConfig.ts +0 -22
  72. package/src/models/PatchedTeamsConfig.ts +0 -12
  73. package/src/models/PatchedTrainingCreate.ts +0 -36
  74. package/src/models/PatchedWebexConfig.ts +0 -15
  75. package/src/models/PatchedWhatsappConfig.ts +0 -16
  76. package/src/models/PatchedWhatsappUserConfig.ts +0 -15
  77. package/src/models/Provider05cEnum.ts +0 -18
  78. package/src/models/Provider63aEnum.ts +0 -10
  79. package/src/models/SlackConfig.ts +0 -13
  80. package/src/models/SlackUserConfig.ts +0 -22
  81. package/src/models/SlackWebhook.ts +0 -11
  82. package/src/models/TeamsConfig.ts +0 -12
  83. package/src/models/TeamsWebhook.ts +0 -22
  84. package/src/models/Training.ts +0 -46
  85. package/src/models/TrainingCreate.ts +0 -36
  86. package/src/models/WebexConfig.ts +0 -15
  87. package/src/models/WebexWebhook.ts +0 -9
  88. package/src/models/WhatsappConfig.ts +0 -16
  89. package/src/models/WhatsappUserConfig.ts +0 -15
  90. package/src/services/AiBotService.ts +0 -1330
  91. package/src/services/AiFinetuningService.ts +0 -472
package/dist/index.umd.js CHANGED
@@ -114,7 +114,7 @@
114
114
 
115
115
  const OpenAPI = {
116
116
  BASE: 'https://base.manager.iblai.app',
117
- VERSION: '4.6.1-ai-plus',
117
+ VERSION: '4.6.2-ai',
118
118
  WITH_CREDENTIALS: false,
119
119
  CREDENTIALS: 'include',
120
120
  TOKEN: undefined,
@@ -275,24 +275,6 @@
275
275
  CrawlerPatternTypeEnum["REGEX"] = "regex";
276
276
  })(exports.CrawlerPatternTypeEnum || (exports.CrawlerPatternTypeEnum = {}));
277
277
 
278
- /* generated using openapi-typescript-codegen -- do not edit */
279
- /* istanbul ignore file */
280
- /* tslint:disable */
281
- /* eslint-disable */
282
- /**
283
- * * `pending` - Pending
284
- * * `processing` - Processing
285
- * * `completed` - Completed
286
- * * `failed` - Failed
287
- */
288
- exports.DataSetStatusEnum = void 0;
289
- (function (DataSetStatusEnum) {
290
- DataSetStatusEnum["PENDING"] = "pending";
291
- DataSetStatusEnum["PROCESSING"] = "processing";
292
- DataSetStatusEnum["COMPLETED"] = "completed";
293
- DataSetStatusEnum["FAILED"] = "failed";
294
- })(exports.DataSetStatusEnum || (exports.DataSetStatusEnum = {}));
295
-
296
278
  /* generated using openapi-typescript-codegen -- do not edit */
297
279
  /* istanbul ignore file */
298
280
  /* tslint:disable */
@@ -589,26 +571,6 @@
589
571
  PromptVisibilityEnum["VIEWABLE_BY_ANYONE"] = "viewable_by_anyone";
590
572
  })(exports.PromptVisibilityEnum || (exports.PromptVisibilityEnum = {}));
591
573
 
592
- /* generated using openapi-typescript-codegen -- do not edit */
593
- /* istanbul ignore file */
594
- /* tslint:disable */
595
- /* eslint-disable */
596
- /**
597
- * * `webex` - Webex
598
- * * `slack` - Slack
599
- * * `whatsapp` - Whatsapp
600
- * * `discord` - Discord
601
- * * `teams` - Teams
602
- */
603
- exports.Provider05cEnum = void 0;
604
- (function (Provider05cEnum) {
605
- Provider05cEnum["WEBEX"] = "webex";
606
- Provider05cEnum["SLACK"] = "slack";
607
- Provider05cEnum["WHATSAPP"] = "whatsapp";
608
- Provider05cEnum["DISCORD"] = "discord";
609
- Provider05cEnum["TEAMS"] = "teams";
610
- })(exports.Provider05cEnum || (exports.Provider05cEnum = {}));
611
-
612
574
  /* generated using openapi-typescript-codegen -- do not edit */
613
575
  /* istanbul ignore file */
614
576
  /* tslint:disable */
@@ -625,18 +587,6 @@
625
587
  Provider637Enum["ELEVENLABS"] = "elevenlabs";
626
588
  })(exports.Provider637Enum || (exports.Provider637Enum = {}));
627
589
 
628
- /* generated using openapi-typescript-codegen -- do not edit */
629
- /* istanbul ignore file */
630
- /* tslint:disable */
631
- /* eslint-disable */
632
- /**
633
- * * `openai` - Openai
634
- */
635
- exports.Provider63aEnum = void 0;
636
- (function (Provider63aEnum) {
637
- Provider63aEnum["OPENAI"] = "openai";
638
- })(exports.Provider63aEnum || (exports.Provider63aEnum = {}));
639
-
640
590
  /* generated using openapi-typescript-codegen -- do not edit */
641
591
  /* istanbul ignore file */
642
592
  /* tslint:disable */
@@ -9345,1844 +9295,503 @@
9345
9295
  }
9346
9296
  }
9347
9297
 
9348
- class AiBotService {
9298
+ class AiIndexService {
9349
9299
  /**
9350
- * Create modify and update bot information for a specific tenant.
9351
- * @returns Bot
9300
+ * Retrieve details of a specific document embedding.
9301
+ *
9302
+ * This endpoint returns detailed information about a specific
9303
+ * document embedding identified by its ID.
9304
+ *
9305
+ * Args:
9306
+ * request: The HTTP request.
9307
+ * org: Organization key identifier.
9308
+ * document_id: The ID of the document embedding to retrieve.
9309
+ *
9310
+ * Returns:
9311
+ * Response: Detailed information about the document embedding.
9312
+ *
9313
+ * Raises:
9314
+ * NotFound: If the specified document embedding does not exist.
9315
+ * @returns RetrieverDocumentEmbedding
9352
9316
  * @throws ApiError
9353
9317
  */
9354
- static aiBotV1BotsBotList({
9355
- org
9318
+ static aiIndexOrgsUsersDocumentsRetrieve({
9319
+ documentId,
9320
+ org,
9321
+ userId
9356
9322
  }) {
9357
9323
  return request(OpenAPI, {
9358
9324
  method: 'GET',
9359
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9325
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9360
9326
  path: {
9361
- 'org': org
9327
+ 'document_id': documentId,
9328
+ 'org': org,
9329
+ 'user_id': userId
9330
+ },
9331
+ errors: {
9332
+ 404: `Document not found`
9362
9333
  }
9363
9334
  });
9364
9335
  }
9365
9336
  /**
9366
- * Create modify and update bot information for a specific tenant.
9367
- * @returns BotCreate
9337
+ * Update a specific document embedding.
9338
+ *
9339
+ * This endpoint allows updating various properties of a document embedding,
9340
+ * including its name, type, pathway, and training status.
9341
+ *
9342
+ * Args:
9343
+ * request: The HTTP request containing the updated document data.
9344
+ * org: Organization key identifier.
9345
+ * document_id: The ID of the document embedding to update.
9346
+ *
9347
+ * Returns:
9348
+ * Response: The updated document embedding information.
9349
+ *
9350
+ * Raises:
9351
+ * BadRequest: If the provided data is invalid.
9352
+ * NotFound: If the specified document embedding does not exist.
9353
+ * @returns RetrieverDocumentEmbedding
9368
9354
  * @throws ApiError
9369
9355
  */
9370
- static aiBotV1BotsBotCreate({
9356
+ static aiIndexOrgsUsersDocumentsUpdate({
9357
+ documentId,
9371
9358
  org,
9372
- requestBody
9359
+ userId,
9360
+ formData
9373
9361
  }) {
9374
9362
  return request(OpenAPI, {
9375
- method: 'POST',
9376
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9363
+ method: 'PUT',
9364
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9377
9365
  path: {
9378
- 'org': org
9366
+ 'document_id': documentId,
9367
+ 'org': org,
9368
+ 'user_id': userId
9379
9369
  },
9380
- body: requestBody,
9381
- mediaType: 'application/json'
9382
- });
9383
- }
9384
- /**
9385
- * Create slash commands for a specific bot
9386
- * eg. /iblai-baseline
9387
- * @returns BotCommand
9388
- * @throws ApiError
9389
- */
9390
- static aiBotV1BotsBotCommandsList({
9391
- org
9392
- }) {
9393
- return request(OpenAPI, {
9394
- method: 'GET',
9395
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9396
- path: {
9397
- 'org': org
9370
+ formData: formData,
9371
+ mediaType: 'multipart/form-data',
9372
+ errors: {
9373
+ 400: `Invalid request data`,
9374
+ 404: `Document not found`
9398
9375
  }
9399
9376
  });
9400
9377
  }
9401
9378
  /**
9402
- * Create slash commands for a specific bot
9403
- * eg. /iblai-baseline
9404
- * @returns BotCommand
9379
+ * Delete a specific document embedding.
9380
+ *
9381
+ * This endpoint removes a document embedding from the system,
9382
+ * including untraining it from any associated pathways.
9383
+ *
9384
+ * Args:
9385
+ * request: The HTTP request.
9386
+ * org: Organization key identifier.
9387
+ * document_id: The ID of the document embedding to delete.
9388
+ *
9389
+ * Returns:
9390
+ * Response: An empty response with a 204 status code if successful.
9391
+ *
9392
+ * Raises:
9393
+ * NotFound: If the specified document embedding does not exist.
9394
+ * @returns void
9405
9395
  * @throws ApiError
9406
9396
  */
9407
- static aiBotV1BotsBotCommandsCreate({
9397
+ static aiIndexOrgsUsersDocumentsDestroy({
9398
+ documentId,
9408
9399
  org,
9409
- requestBody
9400
+ userId
9410
9401
  }) {
9411
9402
  return request(OpenAPI, {
9412
- method: 'POST',
9413
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9403
+ method: 'DELETE',
9404
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9414
9405
  path: {
9415
- 'org': org
9406
+ 'document_id': documentId,
9407
+ 'org': org,
9408
+ 'user_id': userId
9416
9409
  },
9417
- body: requestBody,
9418
- mediaType: 'application/json'
9410
+ errors: {
9411
+ 404: `Document not found`
9412
+ }
9419
9413
  });
9420
9414
  }
9421
9415
  /**
9422
- * Create slash commands for a specific bot
9423
- * eg. /iblai-baseline
9424
- * @returns BotCommand
9416
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9417
+ * @returns DocumentSettingsResponse
9425
9418
  * @throws ApiError
9426
9419
  */
9427
- static aiBotV1BotsBotCommandsRetrieve({
9428
- id,
9429
- org
9420
+ static aiIndexOrgsUsersDocumentsSettingsRetrieve({
9421
+ documentId,
9422
+ org,
9423
+ userId
9430
9424
  }) {
9431
9425
  return request(OpenAPI, {
9432
9426
  method: 'GET',
9433
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9427
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
9434
9428
  path: {
9435
- 'id': id,
9436
- 'org': org
9429
+ 'document_id': documentId,
9430
+ 'org': org,
9431
+ 'user_id': userId
9437
9432
  }
9438
9433
  });
9439
9434
  }
9440
9435
  /**
9441
- * Create slash commands for a specific bot
9442
- * eg. /iblai-baseline
9443
- * @returns BotCommand
9436
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9437
+ * @returns DocumentSettingsResponse
9444
9438
  * @throws ApiError
9445
9439
  */
9446
- static aiBotV1BotsBotCommandsUpdate({
9447
- id,
9440
+ static aiIndexOrgsUsersDocumentsSettingsCreate({
9441
+ documentId,
9448
9442
  org,
9443
+ userId,
9449
9444
  requestBody
9450
9445
  }) {
9451
9446
  return request(OpenAPI, {
9452
- method: 'PUT',
9453
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9447
+ method: 'POST',
9448
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
9454
9449
  path: {
9455
- 'id': id,
9456
- 'org': org
9450
+ 'document_id': documentId,
9451
+ 'org': org,
9452
+ 'user_id': userId
9457
9453
  },
9458
9454
  body: requestBody,
9459
9455
  mediaType: 'application/json'
9460
9456
  });
9461
9457
  }
9462
9458
  /**
9463
- * Create slash commands for a specific bot
9464
- * eg. /iblai-baseline
9465
- * @returns BotCommand
9466
- * @throws ApiError
9467
- */
9468
- static aiBotV1BotsBotCommandsPartialUpdate({
9469
- id,
9459
+ * Description:
9460
+ * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
9461
+ *
9462
+ * Methods:
9463
+ * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
9464
+ *
9465
+ * Parameters:
9466
+ * - search (str): Search query to filter document names or URLs.
9467
+ * - offset (int): Offset number for pagination.
9468
+ * - limit (int): Limit number for pagination.
9469
+ *
9470
+ * Returns:
9471
+ * - GET: A paginated list of document embeddings with their details.
9472
+ * {
9473
+ * "count": 10,
9474
+ * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
9475
+ * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
9476
+ * "results": [
9477
+ * {
9478
+ * "document_name": "Document2",
9479
+ * "platform_key": "example_platform",
9480
+ * "pathway": "example_pathway"
9481
+ * }
9482
+ * ]
9483
+ * }
9484
+ *
9485
+ * Error Responses:
9486
+ * - 400 Bad Request: Invalid query parameters.
9487
+ * - 404 Not Found: No document embeddings found for the specified criteria.
9488
+ * @returns PaginatedRetrieverDocumentEmbeddingList
9489
+ * @throws ApiError
9490
+ */
9491
+ static aiIndexOrgsUsersDocumentsPathwaysList({
9470
9492
  org,
9471
- requestBody
9472
- }) {
9473
- return request(OpenAPI, {
9474
- method: 'PATCH',
9475
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9476
- path: {
9477
- 'id': id,
9478
- 'org': org
9479
- },
9480
- body: requestBody,
9481
- mediaType: 'application/json'
9482
- });
9483
- }
9484
- /**
9485
- * Create slash commands for a specific bot
9486
- * eg. /iblai-baseline
9487
- * @returns void
9488
- * @throws ApiError
9489
- */
9490
- static aiBotV1BotsBotCommandsDestroy({
9491
- id,
9492
- org
9493
- }) {
9494
- return request(OpenAPI, {
9495
- method: 'DELETE',
9496
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9497
- path: {
9498
- 'id': id,
9499
- 'org': org
9500
- }
9501
- });
9502
- }
9503
- /**
9504
- * Create modify and update bot information for a specific tenant.
9505
- * @returns Bot
9506
- * @throws ApiError
9507
- */
9508
- static aiBotV1BotsBotRetrieve({
9509
- id,
9510
- org
9493
+ pathway,
9494
+ userId,
9495
+ limit,
9496
+ offset,
9497
+ search
9511
9498
  }) {
9512
9499
  return request(OpenAPI, {
9513
9500
  method: 'GET',
9514
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9501
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
9515
9502
  path: {
9516
- 'id': id,
9517
- 'org': org
9503
+ 'org': org,
9504
+ 'pathway': pathway,
9505
+ 'user_id': userId
9506
+ },
9507
+ query: {
9508
+ 'limit': limit,
9509
+ 'offset': offset,
9510
+ 'search': search
9518
9511
  }
9519
9512
  });
9520
9513
  }
9521
9514
  /**
9522
- * Create modify and update bot information for a specific tenant.
9523
- * @returns BotCreate
9515
+ * Retrieve resource documents similar to the given query.
9516
+ *
9517
+ * This endpoint performs a semantic search to find documents that are
9518
+ * relevant to the provided query within the specified pathway.
9519
+ *
9520
+ * Args:
9521
+ * request: The HTTP request containing the search query.
9522
+ * org: Organization key identifier.
9523
+ *
9524
+ * Returns:
9525
+ * Response: A list of documents relevant to the search query.
9526
+ *
9527
+ * Raises:
9528
+ * ValidationError: If the request data is invalid.
9529
+ * @returns RetrieverResponseSearch
9524
9530
  * @throws ApiError
9525
9531
  */
9526
- static aiBotV1BotsBotUpdate({
9527
- id,
9532
+ static aiIndexOrgsUsersDocumentsSearchCreate({
9528
9533
  org,
9534
+ userId,
9529
9535
  requestBody
9530
9536
  }) {
9531
9537
  return request(OpenAPI, {
9532
- method: 'PUT',
9533
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9538
+ method: 'POST',
9539
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
9534
9540
  path: {
9535
- 'id': id,
9536
- 'org': org
9541
+ 'org': org,
9542
+ 'user_id': userId
9537
9543
  },
9538
9544
  body: requestBody,
9539
- mediaType: 'application/json'
9545
+ mediaType: 'application/json',
9546
+ errors: {
9547
+ 400: `Invalid request data`
9548
+ }
9540
9549
  });
9541
9550
  }
9542
9551
  /**
9543
- * Create modify and update bot information for a specific tenant.
9544
- * @returns BotCreate
9552
+ * Retrieve document sources related to a given query.
9553
+ *
9554
+ * This endpoint performs a semantic search to find document sources
9555
+ * that are relevant to the provided query within the specified pathway,
9556
+ * and returns them along with confidence levels.
9557
+ *
9558
+ * Args:
9559
+ * request: The HTTP request containing the search query.
9560
+ * org: Organization key identifier.
9561
+ *
9562
+ * Returns:
9563
+ * Response: A list of document sources with confidence levels.
9564
+ *
9565
+ * Raises:
9566
+ * ValidationError: If the request data is invalid.
9567
+ * @returns RetrieverRequestSearchDocument
9545
9568
  * @throws ApiError
9546
9569
  */
9547
- static aiBotV1BotsBotPartialUpdate({
9548
- id,
9570
+ static aiIndexOrgsUsersDocumentsSourcesCreate({
9549
9571
  org,
9572
+ userId,
9550
9573
  requestBody
9551
9574
  }) {
9552
9575
  return request(OpenAPI, {
9553
- method: 'PATCH',
9554
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9576
+ method: 'POST',
9577
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
9555
9578
  path: {
9556
- 'id': id,
9557
- 'org': org
9579
+ 'org': org,
9580
+ 'user_id': userId
9558
9581
  },
9559
9582
  body: requestBody,
9560
- mediaType: 'application/json'
9561
- });
9562
- }
9563
- /**
9564
- * Create modify and update bot information for a specific tenant.
9565
- * @returns void
9566
- * @throws ApiError
9567
- */
9568
- static aiBotV1BotsBotDestroy({
9569
- id,
9570
- org
9571
- }) {
9572
- return request(OpenAPI, {
9573
- method: 'DELETE',
9574
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9575
- path: {
9576
- 'id': id,
9577
- 'org': org
9583
+ mediaType: 'application/json',
9584
+ errors: {
9585
+ 400: `Invalid request data`
9578
9586
  }
9579
9587
  });
9580
9588
  }
9581
9589
  /**
9582
- * Create modify and update bot information for a specific tenant.
9583
- * @returns DiscordConfig
9590
+ * Check the status of a document training task.
9591
+ *
9592
+ * This endpoint retrieves the current status of an asynchronous
9593
+ * document training task that was previously initiated.
9594
+ *
9595
+ * Args:
9596
+ * request: The HTTP request.
9597
+ * org: Organization key identifier.
9598
+ * task_id: The ID of the training task to check.
9599
+ *
9600
+ * Returns:
9601
+ * Response: The current status of the document training task,
9602
+ * which can be "pending", "completed", or "failed".
9603
+ * @returns CheckDocumentTrainingStatus
9584
9604
  * @throws ApiError
9585
9605
  */
9586
- static aiBotV1BotsBotConfigDiscordRetrieve({
9587
- id,
9588
- org
9606
+ static aiIndexOrgsUsersDocumentsTasksRetrieve({
9607
+ org,
9608
+ taskId,
9609
+ userId
9589
9610
  }) {
9590
9611
  return request(OpenAPI, {
9591
9612
  method: 'GET',
9592
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9613
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
9593
9614
  path: {
9594
- 'id': id,
9595
- 'org': org
9615
+ 'org': org,
9616
+ 'task_id': taskId,
9617
+ 'user_id': userId
9596
9618
  }
9597
9619
  });
9598
9620
  }
9599
9621
  /**
9600
- * Create modify and update bot information for a specific tenant.
9601
- * @returns DiscordConfig
9622
+ * Train a document through a worker process.
9623
+ *
9624
+ * This endpoint queues larger documents for training through a worker
9625
+ * process, which is more suitable for handling documents that would
9626
+ * take too long to process directly.
9627
+ *
9628
+ * Args:
9629
+ * request: The HTTP request containing the document information.
9630
+ * org: Organization key identifier.
9631
+ *
9632
+ * Returns:
9633
+ * Response: A confirmation that the document was queued for training,
9634
+ * including a task ID for tracking the progress.
9635
+ *
9636
+ * Raises:
9637
+ * ValidationError: If the request data is invalid.
9638
+ * BadRequest: If there was an error processing the document.
9639
+ * @returns TrainDocumentViewResponse
9602
9640
  * @throws ApiError
9603
9641
  */
9604
- static aiBotV1BotsBotConfigDiscordPartialUpdate({
9605
- id,
9642
+ static aiIndexOrgsUsersDocumentsTrainCreate({
9606
9643
  org,
9607
- requestBody
9644
+ userId,
9645
+ formData
9608
9646
  }) {
9609
9647
  return request(OpenAPI, {
9610
- method: 'PATCH',
9611
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9648
+ method: 'POST',
9649
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
9612
9650
  path: {
9613
- 'id': id,
9614
- 'org': org
9651
+ 'org': org,
9652
+ 'user_id': userId
9615
9653
  },
9616
- body: requestBody,
9617
- mediaType: 'application/json'
9654
+ formData: formData,
9655
+ mediaType: 'multipart/form-data',
9656
+ errors: {
9657
+ 400: `Invalid request data`
9658
+ }
9618
9659
  });
9619
9660
  }
9620
9661
  /**
9621
- * Create modify and update bot information for a specific tenant.
9622
- * @returns SlackConfig
9662
+ * Train a document directly without using a worker.
9663
+ *
9664
+ * This endpoint is designed for training smaller documents directly
9665
+ * without queuing them through a worker process. For larger documents,
9666
+ * use the TrainDocumentView endpoint instead.
9667
+ *
9668
+ * Args:
9669
+ * request: The HTTP request containing the document information.
9670
+ * org: Organization key identifier.
9671
+ *
9672
+ * Returns:
9673
+ * Response: A confirmation that the document was trained successfully.
9674
+ *
9675
+ * Raises:
9676
+ * ValidationError: If the request data is invalid.
9677
+ * BadRequest: If the document training failed.
9678
+ * @returns RetreiverTrainViewResponse
9623
9679
  * @throws ApiError
9624
9680
  */
9625
- static aiBotV1BotsBotConfigSlackRetrieve({
9626
- id,
9627
- org
9681
+ static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
9682
+ org,
9683
+ userId,
9684
+ formData
9628
9685
  }) {
9629
9686
  return request(OpenAPI, {
9630
- method: 'GET',
9631
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/',
9687
+ method: 'POST',
9688
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
9632
9689
  path: {
9633
- 'id': id,
9634
- 'org': org
9690
+ 'org': org,
9691
+ 'user_id': userId
9692
+ },
9693
+ formData: formData,
9694
+ mediaType: 'multipart/form-data',
9695
+ errors: {
9696
+ 400: `Invalid request data or training failed`
9635
9697
  }
9636
9698
  });
9637
9699
  }
9638
9700
  /**
9639
- * Create modify and update bot information for a specific tenant.
9640
- * @returns SlackConfig
9641
- * @throws ApiError
9642
- */
9643
- static aiBotV1BotsBotConfigSlackUpdateCreate({
9644
- id,
9701
+ * Description:
9702
+ * Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
9703
+ * Process document for use in a specific chat session.
9704
+ * which will be processed and made available for the AI to reference
9705
+ * when responding to queries in that session.
9706
+ *
9707
+ * Methods:
9708
+ * - POST: Submits a document or media file for training within a specified chat session.
9709
+ *
9710
+ * Parameters:
9711
+ * - org (str):
9712
+ * - session_id (str): UUID of the chat session for which the document is being submitted.
9713
+ * - *args, **kwargs: Additional arguments.
9714
+ * - file (file): Multipart file input.
9715
+ *
9716
+ * Returns:
9717
+ * - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
9718
+ * {
9719
+ * "message": "File processed."
9720
+ * }
9721
+ *
9722
+ * Error Responses:
9723
+ * - 400 Bad Request:
9724
+ * - "File field is required" if the 'file' parameter is missing.
9725
+ * - "invalid file object" if the file object is not valid.
9726
+ * - Specific error message if an exception occurs while saving to Redis.
9727
+ * - 404 Not Found:
9728
+ * - "Session not found" if the provided session_id does not match any existing session.
9729
+ * - 413 Request Entity Too Large:
9730
+ * - "file is too large" including specific limits for document and media files if the file exceeds size limits.
9731
+ *
9732
+ * Access Control:
9733
+ * Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
9734
+ * @returns TrainChatSessionDocumentView
9735
+ * @throws ApiError
9736
+ */
9737
+ static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
9645
9738
  org,
9646
- requestBody
9739
+ sessionId,
9740
+ userId,
9741
+ formData
9647
9742
  }) {
9648
9743
  return request(OpenAPI, {
9649
9744
  method: 'POST',
9650
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9745
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
9651
9746
  path: {
9652
- 'id': id,
9653
- 'org': org
9747
+ 'org': org,
9748
+ 'session_id': sessionId,
9749
+ 'user_id': userId
9654
9750
  },
9655
- body: requestBody,
9656
- mediaType: 'application/json'
9751
+ formData: formData,
9752
+ mediaType: 'multipart/form-data',
9753
+ errors: {
9754
+ 400: `Invalid file or processing error`,
9755
+ 413: `File too large`
9756
+ }
9657
9757
  });
9658
9758
  }
9659
9759
  /**
9660
- * Create modify and update bot information for a specific tenant.
9661
- * @returns SlackConfig
9760
+ * Retrieve detailed information about a specific scraped resource.
9761
+ *
9762
+ * This endpoint returns the complete scraped data for a specific resource
9763
+ * identified by its ID.
9764
+ *
9765
+ * Args:
9766
+ * request: The HTTP request.
9767
+ * org: Organization key identifier.
9768
+ * user_id: The username of the user associated with the resource.
9769
+ * resource_id: The ID of the resource to retrieve.
9770
+ *
9771
+ * Returns:
9772
+ * Response: The complete scraped data for the specified resource.
9773
+ *
9774
+ * Raises:
9775
+ * NotFound: If the specified resource data does not exist.
9776
+ * @returns ResourceScrappedData
9662
9777
  * @throws ApiError
9663
9778
  */
9664
- static aiBotV1BotsBotConfigSlackUpdateUpdate({
9665
- id,
9779
+ static aiIndexOrgsUsersResourceDataScrappedRetrieve({
9666
9780
  org,
9667
- requestBody
9781
+ resourceId,
9782
+ userId
9668
9783
  }) {
9669
9784
  return request(OpenAPI, {
9670
- method: 'PUT',
9671
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9785
+ method: 'GET',
9786
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/',
9672
9787
  path: {
9673
- 'id': id,
9674
- 'org': org
9788
+ 'org': org,
9789
+ 'resource_id': resourceId,
9790
+ 'user_id': userId
9675
9791
  },
9676
- body: requestBody,
9677
- mediaType: 'application/json'
9678
- });
9679
- }
9680
- /**
9681
- * Create modify and update bot information for a specific tenant.
9682
- * @returns SlackConfig
9683
- * @throws ApiError
9684
- */
9685
- static aiBotV1BotsBotConfigSlackUpdatePartialUpdate({
9686
- id,
9687
- org,
9688
- requestBody
9689
- }) {
9690
- return request(OpenAPI, {
9691
- method: 'PATCH',
9692
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9693
- path: {
9694
- 'id': id,
9695
- 'org': org
9696
- },
9697
- body: requestBody,
9698
- mediaType: 'application/json'
9699
- });
9700
- }
9701
- /**
9702
- * Create modify and update bot information for a specific tenant.
9703
- * @returns TeamsConfig
9704
- * @throws ApiError
9705
- */
9706
- static aiBotV1BotsBotConfigTeamsRetrieve({
9707
- id,
9708
- org
9709
- }) {
9710
- return request(OpenAPI, {
9711
- method: 'GET',
9712
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/',
9713
- path: {
9714
- 'id': id,
9715
- 'org': org
9716
- }
9717
- });
9718
- }
9719
- /**
9720
- * Create modify and update bot information for a specific tenant.
9721
- * @returns TeamsConfig
9722
- * @throws ApiError
9723
- */
9724
- static aiBotV1BotsBotConfigTeamsUpdateCreate({
9725
- id,
9726
- org,
9727
- requestBody
9728
- }) {
9729
- return request(OpenAPI, {
9730
- method: 'POST',
9731
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9732
- path: {
9733
- 'id': id,
9734
- 'org': org
9735
- },
9736
- body: requestBody,
9737
- mediaType: 'application/json'
9738
- });
9739
- }
9740
- /**
9741
- * Create modify and update bot information for a specific tenant.
9742
- * @returns TeamsConfig
9743
- * @throws ApiError
9744
- */
9745
- static aiBotV1BotsBotConfigTeamsUpdateUpdate({
9746
- id,
9747
- org,
9748
- requestBody
9749
- }) {
9750
- return request(OpenAPI, {
9751
- method: 'PUT',
9752
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9753
- path: {
9754
- 'id': id,
9755
- 'org': org
9756
- },
9757
- body: requestBody,
9758
- mediaType: 'application/json'
9759
- });
9760
- }
9761
- /**
9762
- * Create modify and update bot information for a specific tenant.
9763
- * @returns TeamsConfig
9764
- * @throws ApiError
9765
- */
9766
- static aiBotV1BotsBotConfigTeamsUpdatePartialUpdate({
9767
- id,
9768
- org,
9769
- requestBody
9770
- }) {
9771
- return request(OpenAPI, {
9772
- method: 'PATCH',
9773
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9774
- path: {
9775
- 'id': id,
9776
- 'org': org
9777
- },
9778
- body: requestBody,
9779
- mediaType: 'application/json'
9780
- });
9781
- }
9782
- /**
9783
- * Create modify and update bot information for a specific tenant.
9784
- * @returns WebexConfig
9785
- * @throws ApiError
9786
- */
9787
- static aiBotV1BotsBotConfigWebexRetrieve({
9788
- id,
9789
- org
9790
- }) {
9791
- return request(OpenAPI, {
9792
- method: 'GET',
9793
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9794
- path: {
9795
- 'id': id,
9796
- 'org': org
9797
- }
9798
- });
9799
- }
9800
- /**
9801
- * Create modify and update bot information for a specific tenant.
9802
- * @returns WebexConfig
9803
- * @throws ApiError
9804
- */
9805
- static aiBotV1BotsBotConfigWebexPartialUpdate({
9806
- id,
9807
- org,
9808
- requestBody
9809
- }) {
9810
- return request(OpenAPI, {
9811
- method: 'PATCH',
9812
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9813
- path: {
9814
- 'id': id,
9815
- 'org': org
9816
- },
9817
- body: requestBody,
9818
- mediaType: 'application/json'
9819
- });
9820
- }
9821
- /**
9822
- * Create modify and update bot information for a specific tenant.
9823
- * @returns WhatsappConfig
9824
- * @throws ApiError
9825
- */
9826
- static aiBotV1BotsBotConfigWhatsappRetrieve({
9827
- id,
9828
- org
9829
- }) {
9830
- return request(OpenAPI, {
9831
- method: 'GET',
9832
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/whatsapp/',
9833
- path: {
9834
- 'id': id,
9835
- 'org': org
9836
- }
9837
- });
9838
- }
9839
- /**
9840
- * Create modify and update bot information for a specific tenant.
9841
- * @returns WhatsappConfig
9842
- * @throws ApiError
9843
- */
9844
- static aiBotV1BotsBotWhatsappConfigUpdate({
9845
- id,
9846
- org,
9847
- requestBody
9848
- }) {
9849
- return request(OpenAPI, {
9850
- method: 'PUT',
9851
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9852
- path: {
9853
- 'id': id,
9854
- 'org': org
9855
- },
9856
- body: requestBody,
9857
- mediaType: 'application/json'
9858
- });
9859
- }
9860
- /**
9861
- * Create modify and update bot information for a specific tenant.
9862
- * @returns WhatsappConfig
9863
- * @throws ApiError
9864
- */
9865
- static aiBotV1BotsBotWhatsappConfigPartialUpdate({
9866
- id,
9867
- org,
9868
- requestBody
9869
- }) {
9870
- return request(OpenAPI, {
9871
- method: 'PATCH',
9872
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9873
- path: {
9874
- 'id': id,
9875
- 'org': org
9876
- },
9877
- body: requestBody,
9878
- mediaType: 'application/json'
9879
- });
9880
- }
9881
- /**
9882
- * Setup discord user id linkage with discord bots
9883
- * this will be used to authenticate the user when interracting with discord bots.
9884
- * the user id can be copied from the discord app after tapping on the user profile.
9885
- * @returns DiscordUserConfig
9886
- * @throws ApiError
9887
- */
9888
- static aiBotV1BotsDiscordUserConfigList({
9889
- org
9890
- }) {
9891
- return request(OpenAPI, {
9892
- method: 'GET',
9893
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9894
- path: {
9895
- 'org': org
9896
- }
9897
- });
9898
- }
9899
- /**
9900
- * Setup discord user id linkage with discord bots
9901
- * this will be used to authenticate the user when interracting with discord bots.
9902
- * the user id can be copied from the discord app after tapping on the user profile.
9903
- * @returns DiscordUserConfig
9904
- * @throws ApiError
9905
- */
9906
- static aiBotV1BotsDiscordUserConfigCreate({
9907
- org,
9908
- requestBody
9909
- }) {
9910
- return request(OpenAPI, {
9911
- method: 'POST',
9912
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9913
- path: {
9914
- 'org': org
9915
- },
9916
- body: requestBody,
9917
- mediaType: 'application/json'
9918
- });
9919
- }
9920
- /**
9921
- * Setup discord user id linkage with discord bots
9922
- * this will be used to authenticate the user when interracting with discord bots.
9923
- * the user id can be copied from the discord app after tapping on the user profile.
9924
- * @returns DiscordUserConfig
9925
- * @throws ApiError
9926
- */
9927
- static aiBotV1BotsDiscordUserConfigRetrieve({
9928
- id,
9929
- org
9930
- }) {
9931
- return request(OpenAPI, {
9932
- method: 'GET',
9933
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9934
- path: {
9935
- 'id': id,
9936
- 'org': org
9937
- }
9938
- });
9939
- }
9940
- /**
9941
- * Setup discord user id linkage with discord bots
9942
- * this will be used to authenticate the user when interracting with discord bots.
9943
- * the user id can be copied from the discord app after tapping on the user profile.
9944
- * @returns DiscordUserConfig
9945
- * @throws ApiError
9946
- */
9947
- static aiBotV1BotsDiscordUserConfigUpdate({
9948
- id,
9949
- org,
9950
- requestBody
9951
- }) {
9952
- return request(OpenAPI, {
9953
- method: 'PUT',
9954
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9955
- path: {
9956
- 'id': id,
9957
- 'org': org
9958
- },
9959
- body: requestBody,
9960
- mediaType: 'application/json'
9961
- });
9962
- }
9963
- /**
9964
- * Setup discord user id linkage with discord bots
9965
- * this will be used to authenticate the user when interracting with discord bots.
9966
- * the user id can be copied from the discord app after tapping on the user profile.
9967
- * @returns DiscordUserConfig
9968
- * @throws ApiError
9969
- */
9970
- static aiBotV1BotsDiscordUserConfigPartialUpdate({
9971
- id,
9972
- org,
9973
- requestBody
9974
- }) {
9975
- return request(OpenAPI, {
9976
- method: 'PATCH',
9977
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9978
- path: {
9979
- 'id': id,
9980
- 'org': org
9981
- },
9982
- body: requestBody,
9983
- mediaType: 'application/json'
9984
- });
9985
- }
9986
- /**
9987
- * Setup discord user id linkage with discord bots
9988
- * this will be used to authenticate the user when interracting with discord bots.
9989
- * the user id can be copied from the discord app after tapping on the user profile.
9990
- * @returns void
9991
- * @throws ApiError
9992
- */
9993
- static aiBotV1BotsDiscordUserConfigDestroy({
9994
- id,
9995
- org
9996
- }) {
9997
- return request(OpenAPI, {
9998
- method: 'DELETE',
9999
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
10000
- path: {
10001
- 'id': id,
10002
- 'org': org
10003
- }
10004
- });
10005
- }
10006
- /**
10007
- * Setup slack username and domain linkage with slack bots
10008
- * this will be used to authenticate the user when interracting with slack bots.
10009
- * @returns SlackUserConfig
10010
- * @throws ApiError
10011
- */
10012
- static aiBotV1BotsSlackUserConfigList({
10013
- org
10014
- }) {
10015
- return request(OpenAPI, {
10016
- method: 'GET',
10017
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
10018
- path: {
10019
- 'org': org
10020
- }
10021
- });
10022
- }
10023
- /**
10024
- * Setup slack username and domain linkage with slack bots
10025
- * this will be used to authenticate the user when interracting with slack bots.
10026
- * @returns SlackUserConfig
10027
- * @throws ApiError
10028
- */
10029
- static aiBotV1BotsSlackUserConfigCreate({
10030
- org,
10031
- requestBody
10032
- }) {
10033
- return request(OpenAPI, {
10034
- method: 'POST',
10035
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
10036
- path: {
10037
- 'org': org
10038
- },
10039
- body: requestBody,
10040
- mediaType: 'application/json'
10041
- });
10042
- }
10043
- /**
10044
- * Setup slack username and domain linkage with slack bots
10045
- * this will be used to authenticate the user when interracting with slack bots.
10046
- * @returns SlackUserConfig
10047
- * @throws ApiError
10048
- */
10049
- static aiBotV1BotsSlackUserConfigRetrieve({
10050
- id,
10051
- org
10052
- }) {
10053
- return request(OpenAPI, {
10054
- method: 'GET',
10055
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10056
- path: {
10057
- 'id': id,
10058
- 'org': org
10059
- }
10060
- });
10061
- }
10062
- /**
10063
- * Setup slack username and domain linkage with slack bots
10064
- * this will be used to authenticate the user when interracting with slack bots.
10065
- * @returns SlackUserConfig
10066
- * @throws ApiError
10067
- */
10068
- static aiBotV1BotsSlackUserConfigUpdate({
10069
- id,
10070
- org,
10071
- requestBody
10072
- }) {
10073
- return request(OpenAPI, {
10074
- method: 'PUT',
10075
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10076
- path: {
10077
- 'id': id,
10078
- 'org': org
10079
- },
10080
- body: requestBody,
10081
- mediaType: 'application/json'
10082
- });
10083
- }
10084
- /**
10085
- * Setup slack username and domain linkage with slack bots
10086
- * this will be used to authenticate the user when interracting with slack bots.
10087
- * @returns SlackUserConfig
10088
- * @throws ApiError
10089
- */
10090
- static aiBotV1BotsSlackUserConfigPartialUpdate({
10091
- id,
10092
- org,
10093
- requestBody
10094
- }) {
10095
- return request(OpenAPI, {
10096
- method: 'PATCH',
10097
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10098
- path: {
10099
- 'id': id,
10100
- 'org': org
10101
- },
10102
- body: requestBody,
10103
- mediaType: 'application/json'
10104
- });
10105
- }
10106
- /**
10107
- * Setup slack username and domain linkage with slack bots
10108
- * this will be used to authenticate the user when interracting with slack bots.
10109
- * @returns void
10110
- * @throws ApiError
10111
- */
10112
- static aiBotV1BotsSlackUserConfigDestroy({
10113
- id,
10114
- org
10115
- }) {
10116
- return request(OpenAPI, {
10117
- method: 'DELETE',
10118
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
10119
- path: {
10120
- 'id': id,
10121
- 'org': org
10122
- }
10123
- });
10124
- }
10125
- /**
10126
- * Setup phone number linkage with whatsapp bots
10127
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10128
- * @returns WhatsappUserConfig
10129
- * @throws ApiError
10130
- */
10131
- static aiBotV1BotsWhatsappUserConfigList({
10132
- org
10133
- }) {
10134
- return request(OpenAPI, {
10135
- method: 'GET',
10136
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
10137
- path: {
10138
- 'org': org
10139
- }
10140
- });
10141
- }
10142
- /**
10143
- * Setup phone number linkage with whatsapp bots
10144
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10145
- * @returns WhatsappUserConfig
10146
- * @throws ApiError
10147
- */
10148
- static aiBotV1BotsWhatsappUserConfigCreate({
10149
- org,
10150
- requestBody
10151
- }) {
10152
- return request(OpenAPI, {
10153
- method: 'POST',
10154
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
10155
- path: {
10156
- 'org': org
10157
- },
10158
- body: requestBody,
10159
- mediaType: 'application/json'
10160
- });
10161
- }
10162
- /**
10163
- * Setup phone number linkage with whatsapp bots
10164
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10165
- * @returns WhatsappUserConfig
10166
- * @throws ApiError
10167
- */
10168
- static aiBotV1BotsWhatsappUserConfigRetrieve({
10169
- id,
10170
- org
10171
- }) {
10172
- return request(OpenAPI, {
10173
- method: 'GET',
10174
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10175
- path: {
10176
- 'id': id,
10177
- 'org': org
10178
- }
10179
- });
10180
- }
10181
- /**
10182
- * Setup phone number linkage with whatsapp bots
10183
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10184
- * @returns WhatsappUserConfig
10185
- * @throws ApiError
10186
- */
10187
- static aiBotV1BotsWhatsappUserConfigUpdate({
10188
- id,
10189
- org,
10190
- requestBody
10191
- }) {
10192
- return request(OpenAPI, {
10193
- method: 'PUT',
10194
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10195
- path: {
10196
- 'id': id,
10197
- 'org': org
10198
- },
10199
- body: requestBody,
10200
- mediaType: 'application/json'
10201
- });
10202
- }
10203
- /**
10204
- * Setup phone number linkage with whatsapp bots
10205
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10206
- * @returns WhatsappUserConfig
10207
- * @throws ApiError
10208
- */
10209
- static aiBotV1BotsWhatsappUserConfigPartialUpdate({
10210
- id,
10211
- org,
10212
- requestBody
10213
- }) {
10214
- return request(OpenAPI, {
10215
- method: 'PATCH',
10216
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10217
- path: {
10218
- 'id': id,
10219
- 'org': org
10220
- },
10221
- body: requestBody,
10222
- mediaType: 'application/json'
10223
- });
10224
- }
10225
- /**
10226
- * Setup phone number linkage with whatsapp bots
10227
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10228
- * @returns void
10229
- * @throws ApiError
10230
- */
10231
- static aiBotV1BotsWhatsappUserConfigDestroy({
10232
- id,
10233
- org
10234
- }) {
10235
- return request(OpenAPI, {
10236
- method: 'DELETE',
10237
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10238
- path: {
10239
- 'id': id,
10240
- 'org': org
10241
- }
10242
- });
10243
- }
10244
- /**
10245
- * Webhook endpoint to receive and process discord messages.
10246
- * @returns DiscordWebhook
10247
- * @throws ApiError
10248
- */
10249
- static aiBotV1BotsWebhooksDiscordCreate({
10250
- name,
10251
- org,
10252
- requestBody
10253
- }) {
10254
- return request(OpenAPI, {
10255
- method: 'POST',
10256
- url: '/api/ai-bot/v1/bots/webhooks/{org}/discord/{name}/',
10257
- path: {
10258
- 'name': name,
10259
- 'org': org
10260
- },
10261
- body: requestBody,
10262
- mediaType: 'application/json'
10263
- });
10264
- }
10265
- /**
10266
- * @returns SlackWebhook
10267
- * @throws ApiError
10268
- */
10269
- static aiBotV1BotsWebhooksSlackCreate({
10270
- name,
10271
- org,
10272
- requestBody
10273
- }) {
10274
- return request(OpenAPI, {
10275
- method: 'POST',
10276
- url: '/api/ai-bot/v1/bots/webhooks/{org}/slack/{name}/',
10277
- path: {
10278
- 'name': name,
10279
- 'org': org
10280
- },
10281
- body: requestBody,
10282
- mediaType: 'application/json'
10283
- });
10284
- }
10285
- /**
10286
- * @returns TeamsWebhook
10287
- * @throws ApiError
10288
- */
10289
- static aiBotV1BotsWebhooksTeamsCreate({
10290
- name,
10291
- org,
10292
- requestBody
10293
- }) {
10294
- return request(OpenAPI, {
10295
- method: 'POST',
10296
- url: '/api/ai-bot/v1/bots/webhooks/{org}/teams/{name}/',
10297
- path: {
10298
- 'name': name,
10299
- 'org': org
10300
- },
10301
- body: requestBody,
10302
- mediaType: 'application/json'
10303
- });
10304
- }
10305
- /**
10306
- * Webhook endpoint to receive and process discord messages.
10307
- * @returns WebexWebhook
10308
- * @throws ApiError
10309
- */
10310
- static aiBotV1BotsWebhooksWebexCreate({
10311
- name,
10312
- org,
10313
- requestBody
10314
- }) {
10315
- return request(OpenAPI, {
10316
- method: 'POST',
10317
- url: '/api/ai-bot/v1/bots/webhooks/{org}/webex/{name}/',
10318
- path: {
10319
- 'name': name,
10320
- 'org': org
10321
- },
10322
- body: requestBody,
10323
- mediaType: 'application/json'
10324
- });
10325
- }
10326
- /**
10327
- * Respond to whatsapp's webhook challenge.
10328
- * Parameters Required include the tenant key (org) and the name of the bot: (name)
10329
- * @returns WhatAppWebHook
10330
- * @throws ApiError
10331
- */
10332
- static aiBotV1BotsWebhooksWhatsappRetrieve({
10333
- name,
10334
- org
10335
- }) {
10336
- return request(OpenAPI, {
10337
- method: 'GET',
10338
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
10339
- path: {
10340
- 'name': name,
10341
- 'org': org
10342
- }
10343
- });
10344
- }
10345
- /**
10346
- * Accept and process webhook events from whatsapp.
10347
- * @returns WhatAppWebHook
10348
- * @throws ApiError
10349
- */
10350
- static aiBotV1BotsWebhooksWhatsappCreate({
10351
- name,
10352
- org,
10353
- requestBody
10354
- }) {
10355
- return request(OpenAPI, {
10356
- method: 'POST',
10357
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
10358
- path: {
10359
- 'name': name,
10360
- 'org': org
10361
- },
10362
- body: requestBody,
10363
- mediaType: 'application/json'
10364
- });
10365
- }
10366
- }
10367
-
10368
- class AiFinetuningService {
10369
- /**
10370
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10371
- * @returns PaginatedDataSetList
10372
- * @throws ApiError
10373
- */
10374
- static aiFinetuningV1OrgUserDatasetsList({
10375
- org,
10376
- username,
10377
- dateCreated,
10378
- numDataPoints,
10379
- ordering,
10380
- page,
10381
- pageSize,
10382
- retryAttempts,
10383
- search,
10384
- status
10385
- }) {
10386
- return request(OpenAPI, {
10387
- method: 'GET',
10388
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
10389
- path: {
10390
- 'org': org,
10391
- 'username': username
10392
- },
10393
- query: {
10394
- 'date_created': dateCreated,
10395
- 'num_data_points': numDataPoints,
10396
- 'ordering': ordering,
10397
- 'page': page,
10398
- 'page_size': pageSize,
10399
- 'retry_attempts': retryAttempts,
10400
- 'search': search,
10401
- 'status': status
10402
- }
10403
- });
10404
- }
10405
- /**
10406
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10407
- * @returns DataSetCreate
10408
- * @throws ApiError
10409
- */
10410
- static aiFinetuningV1OrgUserDatasetsCreate({
10411
- org,
10412
- username,
10413
- requestBody
10414
- }) {
10415
- return request(OpenAPI, {
10416
- method: 'POST',
10417
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
10418
- path: {
10419
- 'org': org,
10420
- 'username': username
10421
- },
10422
- body: requestBody,
10423
- mediaType: 'application/json'
10424
- });
10425
- }
10426
- /**
10427
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10428
- * @returns DataSet
10429
- * @throws ApiError
10430
- */
10431
- static aiFinetuningV1OrgUserDatasetsRetrieve({
10432
- id,
10433
- org,
10434
- username
10435
- }) {
10436
- return request(OpenAPI, {
10437
- method: 'GET',
10438
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10439
- path: {
10440
- 'id': id,
10441
- 'org': org,
10442
- 'username': username
10443
- }
10444
- });
10445
- }
10446
- /**
10447
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10448
- * @returns DataSet
10449
- * @throws ApiError
10450
- */
10451
- static aiFinetuningV1OrgUserDatasetsUpdate({
10452
- id,
10453
- org,
10454
- username,
10455
- requestBody
10456
- }) {
10457
- return request(OpenAPI, {
10458
- method: 'PUT',
10459
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10460
- path: {
10461
- 'id': id,
10462
- 'org': org,
10463
- 'username': username
10464
- },
10465
- body: requestBody,
10466
- mediaType: 'application/json'
10467
- });
10468
- }
10469
- /**
10470
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10471
- * @returns DataSet
10472
- * @throws ApiError
10473
- */
10474
- static aiFinetuningV1OrgUserDatasetsPartialUpdate({
10475
- id,
10476
- org,
10477
- username,
10478
- requestBody
10479
- }) {
10480
- return request(OpenAPI, {
10481
- method: 'PATCH',
10482
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10483
- path: {
10484
- 'id': id,
10485
- 'org': org,
10486
- 'username': username
10487
- },
10488
- body: requestBody,
10489
- mediaType: 'application/json'
10490
- });
10491
- }
10492
- /**
10493
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10494
- * @returns void
10495
- * @throws ApiError
10496
- */
10497
- static aiFinetuningV1OrgUserDatasetsDestroy({
10498
- id,
10499
- org,
10500
- username
10501
- }) {
10502
- return request(OpenAPI, {
10503
- method: 'DELETE',
10504
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10505
- path: {
10506
- 'id': id,
10507
- 'org': org,
10508
- 'username': username
10509
- }
10510
- });
10511
- }
10512
- /**
10513
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10514
- * @returns PaginatedTrainingList
10515
- * @throws ApiError
10516
- */
10517
- static aiFinetuningV1OrgUserTrainingsList({
10518
- org,
10519
- username,
10520
- baseModelName,
10521
- dataset,
10522
- dateCreated,
10523
- fineTunedModel,
10524
- lastModified,
10525
- ordering,
10526
- page,
10527
- pageSize,
10528
- preprocessDataset,
10529
- provider,
10530
- search,
10531
- status
10532
- }) {
10533
- return request(OpenAPI, {
10534
- method: 'GET',
10535
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
10536
- path: {
10537
- 'org': org,
10538
- 'username': username
10539
- },
10540
- query: {
10541
- 'base_model_name': baseModelName,
10542
- 'dataset': dataset,
10543
- 'date_created': dateCreated,
10544
- 'fine_tuned_model': fineTunedModel,
10545
- 'last_modified': lastModified,
10546
- 'ordering': ordering,
10547
- 'page': page,
10548
- 'page_size': pageSize,
10549
- 'preprocess_dataset': preprocessDataset,
10550
- 'provider': provider,
10551
- 'search': search,
10552
- 'status': status
10553
- }
10554
- });
10555
- }
10556
- /**
10557
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10558
- * @returns TrainingCreate
10559
- * @throws ApiError
10560
- */
10561
- static aiFinetuningV1OrgUserTrainingsCreate({
10562
- org,
10563
- username,
10564
- requestBody
10565
- }) {
10566
- return request(OpenAPI, {
10567
- method: 'POST',
10568
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
10569
- path: {
10570
- 'org': org,
10571
- 'username': username
10572
- },
10573
- body: requestBody,
10574
- mediaType: 'application/json'
10575
- });
10576
- }
10577
- /**
10578
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10579
- * @returns Training
10580
- * @throws ApiError
10581
- */
10582
- static aiFinetuningV1OrgUserTrainingsRetrieve({
10583
- id,
10584
- org,
10585
- username
10586
- }) {
10587
- return request(OpenAPI, {
10588
- method: 'GET',
10589
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10590
- path: {
10591
- 'id': id,
10592
- 'org': org,
10593
- 'username': username
10594
- }
10595
- });
10596
- }
10597
- /**
10598
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10599
- * @returns TrainingCreate
10600
- * @throws ApiError
10601
- */
10602
- static aiFinetuningV1OrgUserTrainingsUpdate({
10603
- id,
10604
- org,
10605
- username,
10606
- requestBody
10607
- }) {
10608
- return request(OpenAPI, {
10609
- method: 'PUT',
10610
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10611
- path: {
10612
- 'id': id,
10613
- 'org': org,
10614
- 'username': username
10615
- },
10616
- body: requestBody,
10617
- mediaType: 'application/json'
10618
- });
10619
- }
10620
- /**
10621
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10622
- * @returns TrainingCreate
10623
- * @throws ApiError
10624
- */
10625
- static aiFinetuningV1OrgUserTrainingsPartialUpdate({
10626
- id,
10627
- org,
10628
- username,
10629
- requestBody
10630
- }) {
10631
- return request(OpenAPI, {
10632
- method: 'PATCH',
10633
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10634
- path: {
10635
- 'id': id,
10636
- 'org': org,
10637
- 'username': username
10638
- },
10639
- body: requestBody,
10640
- mediaType: 'application/json'
10641
- });
10642
- }
10643
- /**
10644
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10645
- * @returns void
10646
- * @throws ApiError
10647
- */
10648
- static aiFinetuningV1OrgUserTrainingsDestroy({
10649
- id,
10650
- org,
10651
- username
10652
- }) {
10653
- return request(OpenAPI, {
10654
- method: 'DELETE',
10655
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10656
- path: {
10657
- 'id': id,
10658
- 'org': org,
10659
- 'username': username
10660
- }
10661
- });
10662
- }
10663
- /**
10664
- * Retrieves a paginated list of completed fine-tuned models, excluding those without a fine-tuned model.
10665
- * Filtering and pagination is allowed.
10666
- *
10667
- * NB: This is only a helper endpoint. The same functionality can be achieved with the appropriate filters using the
10668
- * training list endpoint.
10669
- * Returns:
10670
- * Response: A paginated response containing the serialized fine-tuned models.
10671
- * @returns Training
10672
- * @throws ApiError
10673
- */
10674
- static aiFinetuningV1OrgUserTrainingsFinetunedModelsRetrieve({
10675
- org,
10676
- username
10677
- }) {
10678
- return request(OpenAPI, {
10679
- method: 'GET',
10680
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/finetuned-models/',
10681
- path: {
10682
- 'org': org,
10683
- 'username': username
10684
- }
10685
- });
10686
- }
10687
- }
10688
-
10689
- class AiIndexService {
10690
- /**
10691
- * Retrieve details of a specific document embedding.
10692
- *
10693
- * This endpoint returns detailed information about a specific
10694
- * document embedding identified by its ID.
10695
- *
10696
- * Args:
10697
- * request: The HTTP request.
10698
- * org: Organization key identifier.
10699
- * document_id: The ID of the document embedding to retrieve.
10700
- *
10701
- * Returns:
10702
- * Response: Detailed information about the document embedding.
10703
- *
10704
- * Raises:
10705
- * NotFound: If the specified document embedding does not exist.
10706
- * @returns RetrieverDocumentEmbedding
10707
- * @throws ApiError
10708
- */
10709
- static aiIndexOrgsUsersDocumentsRetrieve({
10710
- documentId,
10711
- org,
10712
- userId
10713
- }) {
10714
- return request(OpenAPI, {
10715
- method: 'GET',
10716
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10717
- path: {
10718
- 'document_id': documentId,
10719
- 'org': org,
10720
- 'user_id': userId
10721
- },
10722
- errors: {
10723
- 404: `Document not found`
10724
- }
10725
- });
10726
- }
10727
- /**
10728
- * Update a specific document embedding.
10729
- *
10730
- * This endpoint allows updating various properties of a document embedding,
10731
- * including its name, type, pathway, and training status.
10732
- *
10733
- * Args:
10734
- * request: The HTTP request containing the updated document data.
10735
- * org: Organization key identifier.
10736
- * document_id: The ID of the document embedding to update.
10737
- *
10738
- * Returns:
10739
- * Response: The updated document embedding information.
10740
- *
10741
- * Raises:
10742
- * BadRequest: If the provided data is invalid.
10743
- * NotFound: If the specified document embedding does not exist.
10744
- * @returns RetrieverDocumentEmbedding
10745
- * @throws ApiError
10746
- */
10747
- static aiIndexOrgsUsersDocumentsUpdate({
10748
- documentId,
10749
- org,
10750
- userId,
10751
- formData
10752
- }) {
10753
- return request(OpenAPI, {
10754
- method: 'PUT',
10755
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10756
- path: {
10757
- 'document_id': documentId,
10758
- 'org': org,
10759
- 'user_id': userId
10760
- },
10761
- formData: formData,
10762
- mediaType: 'multipart/form-data',
10763
- errors: {
10764
- 400: `Invalid request data`,
10765
- 404: `Document not found`
10766
- }
10767
- });
10768
- }
10769
- /**
10770
- * Delete a specific document embedding.
10771
- *
10772
- * This endpoint removes a document embedding from the system,
10773
- * including untraining it from any associated pathways.
10774
- *
10775
- * Args:
10776
- * request: The HTTP request.
10777
- * org: Organization key identifier.
10778
- * document_id: The ID of the document embedding to delete.
10779
- *
10780
- * Returns:
10781
- * Response: An empty response with a 204 status code if successful.
10782
- *
10783
- * Raises:
10784
- * NotFound: If the specified document embedding does not exist.
10785
- * @returns void
10786
- * @throws ApiError
10787
- */
10788
- static aiIndexOrgsUsersDocumentsDestroy({
10789
- documentId,
10790
- org,
10791
- userId
10792
- }) {
10793
- return request(OpenAPI, {
10794
- method: 'DELETE',
10795
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10796
- path: {
10797
- 'document_id': documentId,
10798
- 'org': org,
10799
- 'user_id': userId
10800
- },
10801
- errors: {
10802
- 404: `Document not found`
10803
- }
10804
- });
10805
- }
10806
- /**
10807
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10808
- * @returns DocumentSettingsResponse
10809
- * @throws ApiError
10810
- */
10811
- static aiIndexOrgsUsersDocumentsSettingsRetrieve({
10812
- documentId,
10813
- org,
10814
- userId
10815
- }) {
10816
- return request(OpenAPI, {
10817
- method: 'GET',
10818
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
10819
- path: {
10820
- 'document_id': documentId,
10821
- 'org': org,
10822
- 'user_id': userId
10823
- }
10824
- });
10825
- }
10826
- /**
10827
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10828
- * @returns DocumentSettingsResponse
10829
- * @throws ApiError
10830
- */
10831
- static aiIndexOrgsUsersDocumentsSettingsCreate({
10832
- documentId,
10833
- org,
10834
- userId,
10835
- requestBody
10836
- }) {
10837
- return request(OpenAPI, {
10838
- method: 'POST',
10839
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
10840
- path: {
10841
- 'document_id': documentId,
10842
- 'org': org,
10843
- 'user_id': userId
10844
- },
10845
- body: requestBody,
10846
- mediaType: 'application/json'
10847
- });
10848
- }
10849
- /**
10850
- * Description:
10851
- * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
10852
- *
10853
- * Methods:
10854
- * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
10855
- *
10856
- * Parameters:
10857
- * - search (str): Search query to filter document names or URLs.
10858
- * - offset (int): Offset number for pagination.
10859
- * - limit (int): Limit number for pagination.
10860
- *
10861
- * Returns:
10862
- * - GET: A paginated list of document embeddings with their details.
10863
- * {
10864
- * "count": 10,
10865
- * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
10866
- * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
10867
- * "results": [
10868
- * {
10869
- * "document_name": "Document2",
10870
- * "platform_key": "example_platform",
10871
- * "pathway": "example_pathway"
10872
- * }
10873
- * ]
10874
- * }
10875
- *
10876
- * Error Responses:
10877
- * - 400 Bad Request: Invalid query parameters.
10878
- * - 404 Not Found: No document embeddings found for the specified criteria.
10879
- * @returns PaginatedRetrieverDocumentEmbeddingList
10880
- * @throws ApiError
10881
- */
10882
- static aiIndexOrgsUsersDocumentsPathwaysList({
10883
- org,
10884
- pathway,
10885
- userId,
10886
- limit,
10887
- offset,
10888
- search
10889
- }) {
10890
- return request(OpenAPI, {
10891
- method: 'GET',
10892
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
10893
- path: {
10894
- 'org': org,
10895
- 'pathway': pathway,
10896
- 'user_id': userId
10897
- },
10898
- query: {
10899
- 'limit': limit,
10900
- 'offset': offset,
10901
- 'search': search
10902
- }
10903
- });
10904
- }
10905
- /**
10906
- * Retrieve resource documents similar to the given query.
10907
- *
10908
- * This endpoint performs a semantic search to find documents that are
10909
- * relevant to the provided query within the specified pathway.
10910
- *
10911
- * Args:
10912
- * request: The HTTP request containing the search query.
10913
- * org: Organization key identifier.
10914
- *
10915
- * Returns:
10916
- * Response: A list of documents relevant to the search query.
10917
- *
10918
- * Raises:
10919
- * ValidationError: If the request data is invalid.
10920
- * @returns RetrieverResponseSearch
10921
- * @throws ApiError
10922
- */
10923
- static aiIndexOrgsUsersDocumentsSearchCreate({
10924
- org,
10925
- userId,
10926
- requestBody
10927
- }) {
10928
- return request(OpenAPI, {
10929
- method: 'POST',
10930
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
10931
- path: {
10932
- 'org': org,
10933
- 'user_id': userId
10934
- },
10935
- body: requestBody,
10936
- mediaType: 'application/json',
10937
- errors: {
10938
- 400: `Invalid request data`
10939
- }
10940
- });
10941
- }
10942
- /**
10943
- * Retrieve document sources related to a given query.
10944
- *
10945
- * This endpoint performs a semantic search to find document sources
10946
- * that are relevant to the provided query within the specified pathway,
10947
- * and returns them along with confidence levels.
10948
- *
10949
- * Args:
10950
- * request: The HTTP request containing the search query.
10951
- * org: Organization key identifier.
10952
- *
10953
- * Returns:
10954
- * Response: A list of document sources with confidence levels.
10955
- *
10956
- * Raises:
10957
- * ValidationError: If the request data is invalid.
10958
- * @returns RetrieverRequestSearchDocument
10959
- * @throws ApiError
10960
- */
10961
- static aiIndexOrgsUsersDocumentsSourcesCreate({
10962
- org,
10963
- userId,
10964
- requestBody
10965
- }) {
10966
- return request(OpenAPI, {
10967
- method: 'POST',
10968
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
10969
- path: {
10970
- 'org': org,
10971
- 'user_id': userId
10972
- },
10973
- body: requestBody,
10974
- mediaType: 'application/json',
10975
- errors: {
10976
- 400: `Invalid request data`
10977
- }
10978
- });
10979
- }
10980
- /**
10981
- * Check the status of a document training task.
10982
- *
10983
- * This endpoint retrieves the current status of an asynchronous
10984
- * document training task that was previously initiated.
10985
- *
10986
- * Args:
10987
- * request: The HTTP request.
10988
- * org: Organization key identifier.
10989
- * task_id: The ID of the training task to check.
10990
- *
10991
- * Returns:
10992
- * Response: The current status of the document training task,
10993
- * which can be "pending", "completed", or "failed".
10994
- * @returns CheckDocumentTrainingStatus
10995
- * @throws ApiError
10996
- */
10997
- static aiIndexOrgsUsersDocumentsTasksRetrieve({
10998
- org,
10999
- taskId,
11000
- userId
11001
- }) {
11002
- return request(OpenAPI, {
11003
- method: 'GET',
11004
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
11005
- path: {
11006
- 'org': org,
11007
- 'task_id': taskId,
11008
- 'user_id': userId
11009
- }
11010
- });
11011
- }
11012
- /**
11013
- * Train a document through a worker process.
11014
- *
11015
- * This endpoint queues larger documents for training through a worker
11016
- * process, which is more suitable for handling documents that would
11017
- * take too long to process directly.
11018
- *
11019
- * Args:
11020
- * request: The HTTP request containing the document information.
11021
- * org: Organization key identifier.
11022
- *
11023
- * Returns:
11024
- * Response: A confirmation that the document was queued for training,
11025
- * including a task ID for tracking the progress.
11026
- *
11027
- * Raises:
11028
- * ValidationError: If the request data is invalid.
11029
- * BadRequest: If there was an error processing the document.
11030
- * @returns TrainDocumentViewResponse
11031
- * @throws ApiError
11032
- */
11033
- static aiIndexOrgsUsersDocumentsTrainCreate({
11034
- org,
11035
- userId,
11036
- formData
11037
- }) {
11038
- return request(OpenAPI, {
11039
- method: 'POST',
11040
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
11041
- path: {
11042
- 'org': org,
11043
- 'user_id': userId
11044
- },
11045
- formData: formData,
11046
- mediaType: 'multipart/form-data',
11047
- errors: {
11048
- 400: `Invalid request data`
11049
- }
11050
- });
11051
- }
11052
- /**
11053
- * Train a document directly without using a worker.
11054
- *
11055
- * This endpoint is designed for training smaller documents directly
11056
- * without queuing them through a worker process. For larger documents,
11057
- * use the TrainDocumentView endpoint instead.
11058
- *
11059
- * Args:
11060
- * request: The HTTP request containing the document information.
11061
- * org: Organization key identifier.
11062
- *
11063
- * Returns:
11064
- * Response: A confirmation that the document was trained successfully.
11065
- *
11066
- * Raises:
11067
- * ValidationError: If the request data is invalid.
11068
- * BadRequest: If the document training failed.
11069
- * @returns RetreiverTrainViewResponse
11070
- * @throws ApiError
11071
- */
11072
- static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
11073
- org,
11074
- userId,
11075
- formData
11076
- }) {
11077
- return request(OpenAPI, {
11078
- method: 'POST',
11079
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
11080
- path: {
11081
- 'org': org,
11082
- 'user_id': userId
11083
- },
11084
- formData: formData,
11085
- mediaType: 'multipart/form-data',
11086
- errors: {
11087
- 400: `Invalid request data or training failed`
11088
- }
11089
- });
11090
- }
11091
- /**
11092
- * Description:
11093
- * Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
11094
- * Process document for use in a specific chat session.
11095
- * which will be processed and made available for the AI to reference
11096
- * when responding to queries in that session.
11097
- *
11098
- * Methods:
11099
- * - POST: Submits a document or media file for training within a specified chat session.
11100
- *
11101
- * Parameters:
11102
- * - org (str):
11103
- * - session_id (str): UUID of the chat session for which the document is being submitted.
11104
- * - *args, **kwargs: Additional arguments.
11105
- * - file (file): Multipart file input.
11106
- *
11107
- * Returns:
11108
- * - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
11109
- * {
11110
- * "message": "File processed."
11111
- * }
11112
- *
11113
- * Error Responses:
11114
- * - 400 Bad Request:
11115
- * - "File field is required" if the 'file' parameter is missing.
11116
- * - "invalid file object" if the file object is not valid.
11117
- * - Specific error message if an exception occurs while saving to Redis.
11118
- * - 404 Not Found:
11119
- * - "Session not found" if the provided session_id does not match any existing session.
11120
- * - 413 Request Entity Too Large:
11121
- * - "file is too large" including specific limits for document and media files if the file exceeds size limits.
11122
- *
11123
- * Access Control:
11124
- * Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
11125
- * @returns TrainChatSessionDocumentView
11126
- * @throws ApiError
11127
- */
11128
- static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
11129
- org,
11130
- sessionId,
11131
- userId,
11132
- formData
11133
- }) {
11134
- return request(OpenAPI, {
11135
- method: 'POST',
11136
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
11137
- path: {
11138
- 'org': org,
11139
- 'session_id': sessionId,
11140
- 'user_id': userId
11141
- },
11142
- formData: formData,
11143
- mediaType: 'multipart/form-data',
11144
- errors: {
11145
- 400: `Invalid file or processing error`,
11146
- 413: `File too large`
11147
- }
11148
- });
11149
- }
11150
- /**
11151
- * Retrieve detailed information about a specific scraped resource.
11152
- *
11153
- * This endpoint returns the complete scraped data for a specific resource
11154
- * identified by its ID.
11155
- *
11156
- * Args:
11157
- * request: The HTTP request.
11158
- * org: Organization key identifier.
11159
- * user_id: The username of the user associated with the resource.
11160
- * resource_id: The ID of the resource to retrieve.
11161
- *
11162
- * Returns:
11163
- * Response: The complete scraped data for the specified resource.
11164
- *
11165
- * Raises:
11166
- * NotFound: If the specified resource data does not exist.
11167
- * @returns ResourceScrappedData
11168
- * @throws ApiError
11169
- */
11170
- static aiIndexOrgsUsersResourceDataScrappedRetrieve({
11171
- org,
11172
- resourceId,
11173
- userId
11174
- }) {
11175
- return request(OpenAPI, {
11176
- method: 'GET',
11177
- url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/',
11178
- path: {
11179
- 'org': org,
11180
- 'resource_id': resourceId,
11181
- 'user_id': userId
11182
- },
11183
- errors: {
11184
- 404: `Resource data not found`
11185
- }
9792
+ errors: {
9793
+ 404: `Resource data not found`
9794
+ }
11186
9795
  });
11187
9796
  }
11188
9797
  /**
@@ -16020,6 +14629,50 @@
16020
14629
  }
16021
14630
  });
16022
14631
  }
14632
+ /**
14633
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
14634
+ * @returns AutoMemoryPrompt
14635
+ * @throws ApiError
14636
+ */
14637
+ static aiMentorOrgsUsersMentorsAutoMemoryPromptRetrieve({
14638
+ mentor,
14639
+ org,
14640
+ userId
14641
+ }) {
14642
+ return request(OpenAPI, {
14643
+ method: 'GET',
14644
+ url: '/api/ai-mentor/orgs/{org}/users/{user_id}/mentors/{mentor}/auto-memory-prompt/',
14645
+ path: {
14646
+ 'mentor': mentor,
14647
+ 'org': org,
14648
+ 'user_id': userId
14649
+ }
14650
+ });
14651
+ }
14652
+ /**
14653
+ * Set or reset auto memory prompt
14654
+ * Set or reset auto memory prompt
14655
+ * @returns AutoMemoryPrompt
14656
+ * @throws ApiError
14657
+ */
14658
+ static aiMentorOrgsUsersMentorsAutoMemoryPromptCreate({
14659
+ mentor,
14660
+ org,
14661
+ userId,
14662
+ requestBody
14663
+ }) {
14664
+ return request(OpenAPI, {
14665
+ method: 'POST',
14666
+ url: '/api/ai-mentor/orgs/{org}/users/{user_id}/mentors/{mentor}/auto-memory-prompt/',
14667
+ path: {
14668
+ 'mentor': mentor,
14669
+ 'org': org,
14670
+ 'user_id': userId
14671
+ },
14672
+ body: requestBody,
14673
+ mediaType: 'application/json'
14674
+ });
14675
+ }
16023
14676
  /**
16024
14677
  * Retrieve tools available for a particular mentor.
16025
14678
  * @returns ToolResponse
@@ -35948,8 +34601,6 @@
35948
34601
 
35949
34602
  exports.AiAccountService = AiAccountService;
35950
34603
  exports.AiAnalyticsService = AiAnalyticsService;
35951
- exports.AiBotService = AiBotService;
35952
- exports.AiFinetuningService = AiFinetuningService;
35953
34604
  exports.AiIndexService = AiIndexService;
35954
34605
  exports.AiMarketingService = AiMarketingService;
35955
34606
  exports.AiMediaService = AiMediaService;