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