@iblai/iblai-api 4.6.2-dev1-ai-plus → 4.7.0-ai

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/index.cjs.js +376 -1677
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +377 -1676
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +376 -1677
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +3 -39
  8. package/dist/types/models/MaskedIntegrationCredential.d.ts +8 -0
  9. package/dist/types/models/MaskedLLMCredential.d.ts +8 -0
  10. package/dist/types/models/ToolCategory.d.ts +5 -0
  11. package/dist/types/models/ToolResponse.d.ts +4 -1
  12. package/dist/types/services/AiAccountService.d.ts +54 -0
  13. package/dist/types/services/AiMentorService.d.ts +17 -2
  14. package/package.json +1 -1
  15. package/src/core/OpenAPI.ts +1 -1
  16. package/src/index.ts +3 -39
  17. package/src/models/MaskedIntegrationCredential.ts +13 -0
  18. package/src/models/{PatchedBotCommand.ts → MaskedLLMCredential.ts} +7 -5
  19. package/src/models/{BotCommand.ts → ToolCategory.ts} +3 -4
  20. package/src/models/ToolResponse.ts +4 -1
  21. package/src/services/AiAccountService.ts +82 -0
  22. package/src/services/AiMentorService.ts +36 -0
  23. package/dist/types/models/Bot.d.ts +0 -15
  24. package/dist/types/models/BotCommand.d.ts +0 -6
  25. package/dist/types/models/BotCreate.d.ts +0 -12
  26. package/dist/types/models/DataSet.d.ts +0 -21
  27. package/dist/types/models/DataSetCreate.d.ts +0 -12
  28. package/dist/types/models/DataSetStatusEnum.d.ts +0 -12
  29. package/dist/types/models/DiscordConfig.d.ts +0 -7
  30. package/dist/types/models/DiscordUserConfig.d.ts +0 -10
  31. package/dist/types/models/DiscordWebhook.d.ts +0 -6
  32. package/dist/types/models/PaginatedDataSetList.d.ts +0 -7
  33. package/dist/types/models/PaginatedTrainingList.d.ts +0 -7
  34. package/dist/types/models/PatchedBotCommand.d.ts +0 -6
  35. package/dist/types/models/PatchedBotCreate.d.ts +0 -12
  36. package/dist/types/models/PatchedDataSet.d.ts +0 -21
  37. package/dist/types/models/PatchedDiscordConfig.d.ts +0 -7
  38. package/dist/types/models/PatchedDiscordUserConfig.d.ts +0 -10
  39. package/dist/types/models/PatchedSlackConfig.d.ts +0 -8
  40. package/dist/types/models/PatchedSlackUserConfig.d.ts +0 -17
  41. package/dist/types/models/PatchedTeamsConfig.d.ts +0 -7
  42. package/dist/types/models/PatchedTrainingCreate.d.ts +0 -31
  43. package/dist/types/models/PatchedWebexConfig.d.ts +0 -10
  44. package/dist/types/models/PatchedWhatsappConfig.d.ts +0 -11
  45. package/dist/types/models/PatchedWhatsappUserConfig.d.ts +0 -10
  46. package/dist/types/models/Provider05cEnum.d.ts +0 -14
  47. package/dist/types/models/Provider63aEnum.d.ts +0 -6
  48. package/dist/types/models/SlackConfig.d.ts +0 -8
  49. package/dist/types/models/SlackUserConfig.d.ts +0 -17
  50. package/dist/types/models/SlackWebhook.d.ts +0 -6
  51. package/dist/types/models/TeamsConfig.d.ts +0 -7
  52. package/dist/types/models/TeamsWebhook.d.ts +0 -17
  53. package/dist/types/models/Training.d.ts +0 -41
  54. package/dist/types/models/TrainingCreate.d.ts +0 -31
  55. package/dist/types/models/WebexConfig.d.ts +0 -10
  56. package/dist/types/models/WebexWebhook.d.ts +0 -4
  57. package/dist/types/models/WhatAppWebHook.d.ts +0 -3
  58. package/dist/types/models/WhatsappConfig.d.ts +0 -11
  59. package/dist/types/models/WhatsappUserConfig.d.ts +0 -10
  60. package/dist/types/services/AiBotService.d.ts +0 -642
  61. package/dist/types/services/AiFinetuningService.d.ts +0 -232
  62. package/src/models/Bot.ts +0 -20
  63. package/src/models/BotCreate.ts +0 -17
  64. package/src/models/DataSet.ts +0 -26
  65. package/src/models/DataSetCreate.ts +0 -17
  66. package/src/models/DataSetStatusEnum.ts +0 -16
  67. package/src/models/DiscordConfig.ts +0 -12
  68. package/src/models/DiscordUserConfig.ts +0 -15
  69. package/src/models/DiscordWebhook.ts +0 -11
  70. package/src/models/PaginatedDataSetList.ts +0 -12
  71. package/src/models/PaginatedTrainingList.ts +0 -12
  72. package/src/models/PatchedBotCreate.ts +0 -17
  73. package/src/models/PatchedDataSet.ts +0 -26
  74. package/src/models/PatchedDiscordConfig.ts +0 -12
  75. package/src/models/PatchedDiscordUserConfig.ts +0 -15
  76. package/src/models/PatchedSlackConfig.ts +0 -13
  77. package/src/models/PatchedSlackUserConfig.ts +0 -22
  78. package/src/models/PatchedTeamsConfig.ts +0 -12
  79. package/src/models/PatchedTrainingCreate.ts +0 -36
  80. package/src/models/PatchedWebexConfig.ts +0 -15
  81. package/src/models/PatchedWhatsappConfig.ts +0 -16
  82. package/src/models/PatchedWhatsappUserConfig.ts +0 -15
  83. package/src/models/Provider05cEnum.ts +0 -18
  84. package/src/models/Provider63aEnum.ts +0 -10
  85. package/src/models/SlackConfig.ts +0 -13
  86. package/src/models/SlackUserConfig.ts +0 -22
  87. package/src/models/SlackWebhook.ts +0 -11
  88. package/src/models/TeamsConfig.ts +0 -12
  89. package/src/models/TeamsWebhook.ts +0 -22
  90. package/src/models/Training.ts +0 -46
  91. package/src/models/TrainingCreate.ts +0 -36
  92. package/src/models/WebexConfig.ts +0 -15
  93. package/src/models/WebexWebhook.ts +0 -9
  94. package/src/models/WhatAppWebHook.ts +0 -8
  95. package/src/models/WhatsappConfig.ts +0 -16
  96. package/src/models/WhatsappUserConfig.ts +0 -15
  97. package/src/services/AiBotService.ts +0 -1330
  98. 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.2-ai-plus',
117
+ VERSION: '4.7.0-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 */
@@ -1578,6 +1528,74 @@
1578
1528
  }
1579
1529
  });
1580
1530
  }
1531
+ /**
1532
+ * Retrieve masked integration credentials for an organization.
1533
+ *
1534
+ * Query Parameters:
1535
+ * name (optional): Filter results by integration service name
1536
+ *
1537
+ * Args:
1538
+ * request: The HTTP request
1539
+ * org: Organization key identifier
1540
+ *
1541
+ * Returns:
1542
+ * Response: List of integration credentials for the organization
1543
+ *
1544
+ * Raises:
1545
+ * NotFound: When organization is not found or when no credentials match the filters
1546
+ * ValidationError: When query parameters are invalid
1547
+ * @returns MaskedIntegrationCredential
1548
+ * @throws ApiError
1549
+ */
1550
+ static aiAccountOrgsMaskedIntegrationCredentialList({
1551
+ org,
1552
+ name
1553
+ }) {
1554
+ return request(OpenAPI, {
1555
+ method: 'GET',
1556
+ url: '/api/ai-account/orgs/{org}/masked-integration-credential/',
1557
+ path: {
1558
+ 'org': org
1559
+ },
1560
+ query: {
1561
+ 'name': name
1562
+ }
1563
+ });
1564
+ }
1565
+ /**
1566
+ * Retrieve LLM credentials for an organization with the value entries masked.
1567
+ *
1568
+ * Query Parameters:
1569
+ * name (optional): Filter results by LLM provider name
1570
+ *
1571
+ * Args:
1572
+ * request: The HTTP request
1573
+ * org: Organization key identifier
1574
+ *
1575
+ * Returns:
1576
+ * Response: List of LLM credentials for the organization
1577
+ *
1578
+ * Raises:
1579
+ * NotFound: When organization is not found or when no credentials match the filters
1580
+ * ValidationError: When query parameters are invalid
1581
+ * @returns MaskedLLMCredential
1582
+ * @throws ApiError
1583
+ */
1584
+ static aiAccountOrgsMaskedLlmCredentialRetrieve({
1585
+ org,
1586
+ name
1587
+ }) {
1588
+ return request(OpenAPI, {
1589
+ method: 'GET',
1590
+ url: '/api/ai-account/orgs/{org}/masked-llm-credential/',
1591
+ path: {
1592
+ 'org': org
1593
+ },
1594
+ query: {
1595
+ 'name': name
1596
+ }
1597
+ });
1598
+ }
1581
1599
  /**
1582
1600
  * Enable or disable the use of main LLM credentials for an organization.
1583
1601
  *
@@ -9345,1747 +9363,406 @@
9345
9363
  }
9346
9364
  }
9347
9365
 
9348
- class AiBotService {
9366
+ class AiIndexService {
9349
9367
  /**
9350
- * Create modify and update bot information for a specific tenant.
9351
- * @returns Bot
9368
+ * Retrieve details of a specific document embedding.
9369
+ *
9370
+ * This endpoint returns detailed information about a specific
9371
+ * document embedding identified by its ID.
9372
+ *
9373
+ * Args:
9374
+ * request: The HTTP request.
9375
+ * org: Organization key identifier.
9376
+ * document_id: The ID of the document embedding to retrieve.
9377
+ *
9378
+ * Returns:
9379
+ * Response: Detailed information about the document embedding.
9380
+ *
9381
+ * Raises:
9382
+ * NotFound: If the specified document embedding does not exist.
9383
+ * @returns RetrieverDocumentEmbedding
9352
9384
  * @throws ApiError
9353
9385
  */
9354
- static aiBotV1BotsBotList({
9355
- org
9386
+ static aiIndexOrgsUsersDocumentsRetrieve({
9387
+ documentId,
9388
+ org,
9389
+ userId
9356
9390
  }) {
9357
9391
  return request(OpenAPI, {
9358
9392
  method: 'GET',
9359
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9393
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9360
9394
  path: {
9361
- 'org': org
9395
+ 'document_id': documentId,
9396
+ 'org': org,
9397
+ 'user_id': userId
9398
+ },
9399
+ errors: {
9400
+ 404: `Document not found`
9362
9401
  }
9363
9402
  });
9364
9403
  }
9365
9404
  /**
9366
- * Create modify and update bot information for a specific tenant.
9367
- * @returns BotCreate
9405
+ * Update a specific document embedding.
9406
+ *
9407
+ * This endpoint allows updating various properties of a document embedding,
9408
+ * including its name, type, pathway, and training status.
9409
+ *
9410
+ * Args:
9411
+ * request: The HTTP request containing the updated document data.
9412
+ * org: Organization key identifier.
9413
+ * document_id: The ID of the document embedding to update.
9414
+ *
9415
+ * Returns:
9416
+ * Response: The updated document embedding information.
9417
+ *
9418
+ * Raises:
9419
+ * BadRequest: If the provided data is invalid.
9420
+ * NotFound: If the specified document embedding does not exist.
9421
+ * @returns RetrieverDocumentEmbedding
9368
9422
  * @throws ApiError
9369
9423
  */
9370
- static aiBotV1BotsBotCreate({
9424
+ static aiIndexOrgsUsersDocumentsUpdate({
9425
+ documentId,
9371
9426
  org,
9372
- requestBody
9427
+ userId,
9428
+ formData
9373
9429
  }) {
9374
9430
  return request(OpenAPI, {
9375
- method: 'POST',
9376
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9431
+ method: 'PUT',
9432
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9377
9433
  path: {
9378
- 'org': org
9434
+ 'document_id': documentId,
9435
+ 'org': org,
9436
+ 'user_id': userId
9379
9437
  },
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
9438
+ formData: formData,
9439
+ mediaType: 'multipart/form-data',
9440
+ errors: {
9441
+ 400: `Invalid request data`,
9442
+ 404: `Document not found`
9398
9443
  }
9399
9444
  });
9400
9445
  }
9401
9446
  /**
9402
- * Create slash commands for a specific bot
9403
- * eg. /iblai-baseline
9404
- * @returns BotCommand
9447
+ * Delete a specific document embedding.
9448
+ *
9449
+ * This endpoint removes a document embedding from the system,
9450
+ * including untraining it from any associated pathways.
9451
+ *
9452
+ * Args:
9453
+ * request: The HTTP request.
9454
+ * org: Organization key identifier.
9455
+ * document_id: The ID of the document embedding to delete.
9456
+ *
9457
+ * Returns:
9458
+ * Response: An empty response with a 204 status code if successful.
9459
+ *
9460
+ * Raises:
9461
+ * NotFound: If the specified document embedding does not exist.
9462
+ * @returns void
9405
9463
  * @throws ApiError
9406
9464
  */
9407
- static aiBotV1BotsBotCommandsCreate({
9465
+ static aiIndexOrgsUsersDocumentsDestroy({
9466
+ documentId,
9408
9467
  org,
9409
- requestBody
9468
+ userId
9410
9469
  }) {
9411
9470
  return request(OpenAPI, {
9412
- method: 'POST',
9413
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9471
+ method: 'DELETE',
9472
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9414
9473
  path: {
9415
- 'org': org
9474
+ 'document_id': documentId,
9475
+ 'org': org,
9476
+ 'user_id': userId
9416
9477
  },
9417
- body: requestBody,
9418
- mediaType: 'application/json'
9478
+ errors: {
9479
+ 404: `Document not found`
9480
+ }
9419
9481
  });
9420
9482
  }
9421
9483
  /**
9422
- * Create slash commands for a specific bot
9423
- * eg. /iblai-baseline
9424
- * @returns BotCommand
9484
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9485
+ * @returns DocumentSettingsResponse
9425
9486
  * @throws ApiError
9426
9487
  */
9427
- static aiBotV1BotsBotCommandsRetrieve({
9428
- id,
9429
- org
9488
+ static aiIndexOrgsUsersDocumentsSettingsRetrieve({
9489
+ documentId,
9490
+ org,
9491
+ userId
9430
9492
  }) {
9431
9493
  return request(OpenAPI, {
9432
9494
  method: 'GET',
9433
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9495
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
9434
9496
  path: {
9435
- 'id': id,
9436
- 'org': org
9497
+ 'document_id': documentId,
9498
+ 'org': org,
9499
+ 'user_id': userId
9437
9500
  }
9438
9501
  });
9439
9502
  }
9440
9503
  /**
9441
- * Create slash commands for a specific bot
9442
- * eg. /iblai-baseline
9443
- * @returns BotCommand
9504
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9505
+ * @returns DocumentSettingsResponse
9444
9506
  * @throws ApiError
9445
9507
  */
9446
- static aiBotV1BotsBotCommandsUpdate({
9447
- id,
9508
+ static aiIndexOrgsUsersDocumentsSettingsCreate({
9509
+ documentId,
9448
9510
  org,
9511
+ userId,
9449
9512
  requestBody
9450
9513
  }) {
9451
9514
  return request(OpenAPI, {
9452
- method: 'PUT',
9453
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9515
+ method: 'POST',
9516
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
9454
9517
  path: {
9455
- 'id': id,
9456
- 'org': org
9518
+ 'document_id': documentId,
9519
+ 'org': org,
9520
+ 'user_id': userId
9457
9521
  },
9458
9522
  body: requestBody,
9459
9523
  mediaType: 'application/json'
9460
9524
  });
9461
9525
  }
9462
9526
  /**
9463
- * Create slash commands for a specific bot
9464
- * eg. /iblai-baseline
9465
- * @returns BotCommand
9466
- * @throws ApiError
9467
- */
9468
- static aiBotV1BotsBotCommandsPartialUpdate({
9469
- id,
9527
+ * Description:
9528
+ * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
9529
+ *
9530
+ * Methods:
9531
+ * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
9532
+ *
9533
+ * Parameters:
9534
+ * - search (str): Search query to filter document names or URLs.
9535
+ * - offset (int): Offset number for pagination.
9536
+ * - limit (int): Limit number for pagination.
9537
+ *
9538
+ * Returns:
9539
+ * - GET: A paginated list of document embeddings with their details.
9540
+ * {
9541
+ * "count": 10,
9542
+ * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
9543
+ * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
9544
+ * "results": [
9545
+ * {
9546
+ * "document_name": "Document2",
9547
+ * "platform_key": "example_platform",
9548
+ * "pathway": "example_pathway"
9549
+ * }
9550
+ * ]
9551
+ * }
9552
+ *
9553
+ * Error Responses:
9554
+ * - 400 Bad Request: Invalid query parameters.
9555
+ * - 404 Not Found: No document embeddings found for the specified criteria.
9556
+ * @returns PaginatedRetrieverDocumentEmbeddingList
9557
+ * @throws ApiError
9558
+ */
9559
+ static aiIndexOrgsUsersDocumentsPathwaysList({
9470
9560
  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
9561
+ pathway,
9562
+ userId,
9563
+ limit,
9564
+ offset,
9565
+ search
9511
9566
  }) {
9512
9567
  return request(OpenAPI, {
9513
9568
  method: 'GET',
9514
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9569
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
9515
9570
  path: {
9516
- 'id': id,
9517
- 'org': org
9571
+ 'org': org,
9572
+ 'pathway': pathway,
9573
+ 'user_id': userId
9574
+ },
9575
+ query: {
9576
+ 'limit': limit,
9577
+ 'offset': offset,
9578
+ 'search': search
9518
9579
  }
9519
9580
  });
9520
9581
  }
9521
9582
  /**
9522
- * Create modify and update bot information for a specific tenant.
9523
- * @returns BotCreate
9583
+ * Retrieve resource documents similar to the given query.
9584
+ *
9585
+ * This endpoint performs a semantic search to find documents that are
9586
+ * relevant to the provided query within the specified pathway.
9587
+ *
9588
+ * Args:
9589
+ * request: The HTTP request containing the search query.
9590
+ * org: Organization key identifier.
9591
+ *
9592
+ * Returns:
9593
+ * Response: A list of documents relevant to the search query.
9594
+ *
9595
+ * Raises:
9596
+ * ValidationError: If the request data is invalid.
9597
+ * @returns RetrieverResponseSearch
9524
9598
  * @throws ApiError
9525
9599
  */
9526
- static aiBotV1BotsBotUpdate({
9527
- id,
9600
+ static aiIndexOrgsUsersDocumentsSearchCreate({
9528
9601
  org,
9602
+ userId,
9529
9603
  requestBody
9530
9604
  }) {
9531
9605
  return request(OpenAPI, {
9532
- method: 'PUT',
9533
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9606
+ method: 'POST',
9607
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
9534
9608
  path: {
9535
- 'id': id,
9536
- 'org': org
9609
+ 'org': org,
9610
+ 'user_id': userId
9537
9611
  },
9538
9612
  body: requestBody,
9539
- mediaType: 'application/json'
9613
+ mediaType: 'application/json',
9614
+ errors: {
9615
+ 400: `Invalid request data`
9616
+ }
9540
9617
  });
9541
9618
  }
9542
9619
  /**
9543
- * Create modify and update bot information for a specific tenant.
9544
- * @returns BotCreate
9620
+ * Retrieve document sources related to a given query.
9621
+ *
9622
+ * This endpoint performs a semantic search to find document sources
9623
+ * that are relevant to the provided query within the specified pathway,
9624
+ * and returns them along with confidence levels.
9625
+ *
9626
+ * Args:
9627
+ * request: The HTTP request containing the search query.
9628
+ * org: Organization key identifier.
9629
+ *
9630
+ * Returns:
9631
+ * Response: A list of document sources with confidence levels.
9632
+ *
9633
+ * Raises:
9634
+ * ValidationError: If the request data is invalid.
9635
+ * @returns RetrieverRequestSearchDocument
9545
9636
  * @throws ApiError
9546
9637
  */
9547
- static aiBotV1BotsBotPartialUpdate({
9548
- id,
9638
+ static aiIndexOrgsUsersDocumentsSourcesCreate({
9549
9639
  org,
9640
+ userId,
9550
9641
  requestBody
9551
9642
  }) {
9552
9643
  return request(OpenAPI, {
9553
- method: 'PATCH',
9554
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9644
+ method: 'POST',
9645
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
9555
9646
  path: {
9556
- 'id': id,
9557
- 'org': org
9647
+ 'org': org,
9648
+ 'user_id': userId
9558
9649
  },
9559
9650
  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
9578
- }
9579
- });
9580
- }
9581
- /**
9582
- * Create modify and update bot information for a specific tenant.
9583
- * @returns DiscordConfig
9584
- * @throws ApiError
9585
- */
9586
- static aiBotV1BotsBotConfigDiscordRetrieve({
9587
- id,
9588
- org
9589
- }) {
9590
- return request(OpenAPI, {
9591
- method: 'GET',
9592
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9593
- path: {
9594
- 'id': id,
9595
- 'org': org
9651
+ mediaType: 'application/json',
9652
+ errors: {
9653
+ 400: `Invalid request data`
9596
9654
  }
9597
9655
  });
9598
9656
  }
9599
9657
  /**
9600
- * Create modify and update bot information for a specific tenant.
9601
- * @returns DiscordConfig
9658
+ * Check the status of a document training task.
9659
+ *
9660
+ * This endpoint retrieves the current status of an asynchronous
9661
+ * document training task that was previously initiated.
9662
+ *
9663
+ * Args:
9664
+ * request: The HTTP request.
9665
+ * org: Organization key identifier.
9666
+ * task_id: The ID of the training task to check.
9667
+ *
9668
+ * Returns:
9669
+ * Response: The current status of the document training task,
9670
+ * which can be "pending", "completed", or "failed".
9671
+ * @returns CheckDocumentTrainingStatus
9602
9672
  * @throws ApiError
9603
9673
  */
9604
- static aiBotV1BotsBotConfigDiscordPartialUpdate({
9605
- id,
9674
+ static aiIndexOrgsUsersDocumentsTasksRetrieve({
9606
9675
  org,
9607
- requestBody
9608
- }) {
9609
- return request(OpenAPI, {
9610
- method: 'PATCH',
9611
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9612
- path: {
9613
- 'id': id,
9614
- 'org': org
9615
- },
9616
- body: requestBody,
9617
- mediaType: 'application/json'
9618
- });
9619
- }
9620
- /**
9621
- * Create modify and update bot information for a specific tenant.
9622
- * @returns SlackConfig
9623
- * @throws ApiError
9624
- */
9625
- static aiBotV1BotsBotConfigSlackRetrieve({
9626
- id,
9627
- org
9676
+ taskId,
9677
+ userId
9628
9678
  }) {
9629
9679
  return request(OpenAPI, {
9630
9680
  method: 'GET',
9631
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/',
9681
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
9632
9682
  path: {
9633
- 'id': id,
9634
- 'org': org
9683
+ 'org': org,
9684
+ 'task_id': taskId,
9685
+ 'user_id': userId
9635
9686
  }
9636
9687
  });
9637
9688
  }
9638
9689
  /**
9639
- * Create modify and update bot information for a specific tenant.
9640
- * @returns SlackConfig
9690
+ * Train a document through a worker process.
9691
+ *
9692
+ * This endpoint queues larger documents for training through a worker
9693
+ * process, which is more suitable for handling documents that would
9694
+ * take too long to process directly.
9695
+ *
9696
+ * Args:
9697
+ * request: The HTTP request containing the document information.
9698
+ * org: Organization key identifier.
9699
+ *
9700
+ * Returns:
9701
+ * Response: A confirmation that the document was queued for training,
9702
+ * including a task ID for tracking the progress.
9703
+ *
9704
+ * Raises:
9705
+ * ValidationError: If the request data is invalid.
9706
+ * BadRequest: If there was an error processing the document.
9707
+ * @returns TrainDocumentViewResponse
9641
9708
  * @throws ApiError
9642
9709
  */
9643
- static aiBotV1BotsBotConfigSlackUpdateCreate({
9644
- id,
9710
+ static aiIndexOrgsUsersDocumentsTrainCreate({
9645
9711
  org,
9646
- requestBody
9712
+ userId,
9713
+ formData
9647
9714
  }) {
9648
9715
  return request(OpenAPI, {
9649
9716
  method: 'POST',
9650
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9717
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
9651
9718
  path: {
9652
- 'id': id,
9653
- 'org': org
9719
+ 'org': org,
9720
+ 'user_id': userId
9654
9721
  },
9655
- body: requestBody,
9656
- mediaType: 'application/json'
9722
+ formData: formData,
9723
+ mediaType: 'multipart/form-data',
9724
+ errors: {
9725
+ 400: `Invalid request data`
9726
+ }
9657
9727
  });
9658
9728
  }
9659
9729
  /**
9660
- * Create modify and update bot information for a specific tenant.
9661
- * @returns SlackConfig
9730
+ * Train a document directly without using a worker.
9731
+ *
9732
+ * This endpoint is designed for training smaller documents directly
9733
+ * without queuing them through a worker process. For larger documents,
9734
+ * use the TrainDocumentView endpoint instead.
9735
+ *
9736
+ * Args:
9737
+ * request: The HTTP request containing the document information.
9738
+ * org: Organization key identifier.
9739
+ *
9740
+ * Returns:
9741
+ * Response: A confirmation that the document was trained successfully.
9742
+ *
9743
+ * Raises:
9744
+ * ValidationError: If the request data is invalid.
9745
+ * BadRequest: If the document training failed.
9746
+ * @returns RetreiverTrainViewResponse
9662
9747
  * @throws ApiError
9663
9748
  */
9664
- static aiBotV1BotsBotConfigSlackUpdateUpdate({
9665
- id,
9749
+ static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
9666
9750
  org,
9667
- requestBody
9751
+ userId,
9752
+ formData
9668
9753
  }) {
9669
9754
  return request(OpenAPI, {
9670
- method: 'PUT',
9671
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9755
+ method: 'POST',
9756
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
9672
9757
  path: {
9673
- 'id': id,
9674
- 'org': org
9758
+ 'org': org,
9759
+ 'user_id': userId
9675
9760
  },
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
- }
9761
+ formData: formData,
9762
+ mediaType: 'multipart/form-data',
9763
+ errors: {
9764
+ 400: `Invalid request data or training failed`
9765
+ }
11089
9766
  });
11090
9767
  }
11091
9768
  /**
@@ -16072,7 +14749,9 @@
16072
14749
  static aiMentorOrgsUsersMentorsAvailableToolsList({
16073
14750
  mentor,
16074
14751
  org,
16075
- userId
14752
+ userId,
14753
+ ordering,
14754
+ search
16076
14755
  }) {
16077
14756
  return request(OpenAPI, {
16078
14757
  method: 'GET',
@@ -16081,6 +14760,10 @@
16081
14760
  'mentor': mentor,
16082
14761
  'org': org,
16083
14762
  'user_id': userId
14763
+ },
14764
+ query: {
14765
+ 'ordering': ordering,
14766
+ 'search': search
16084
14767
  }
16085
14768
  });
16086
14769
  }
@@ -19406,6 +18089,24 @@
19406
18089
  mediaType: 'application/json'
19407
18090
  });
19408
18091
  }
18092
+ /**
18093
+ * Retrieve Tool Categories
18094
+ * @returns ToolCategory
18095
+ * @throws ApiError
18096
+ */
18097
+ static aiMentorOrgsUsersToolCategoriesList({
18098
+ org,
18099
+ userId
18100
+ }) {
18101
+ return request(OpenAPI, {
18102
+ method: 'GET',
18103
+ url: '/api/ai-mentor/orgs/{org}/users/{user_id}/tool-categories/',
18104
+ path: {
18105
+ 'org': org,
18106
+ 'user_id': userId
18107
+ }
18108
+ });
18109
+ }
19409
18110
  /**
19410
18111
  * Retrieve a list of available voice options.
19411
18112
  *
@@ -35992,8 +34693,6 @@
35992
34693
 
35993
34694
  exports.AiAccountService = AiAccountService;
35994
34695
  exports.AiAnalyticsService = AiAnalyticsService;
35995
- exports.AiBotService = AiBotService;
35996
- exports.AiFinetuningService = AiFinetuningService;
35997
34696
  exports.AiIndexService = AiIndexService;
35998
34697
  exports.AiMarketingService = AiMarketingService;
35999
34698
  exports.AiMediaService = AiMediaService;