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