@iblai/iblai-api 4.6.0-ai-plus → 4.6.1-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 (93) hide show
  1. package/dist/index.cjs.js +450 -1674
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +451 -1673
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +450 -1674
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +1 -39
  8. package/dist/types/models/SessionMemoryAttachment.d.ts +3 -0
  9. package/dist/types/services/AiAccountService.d.ts +85 -0
  10. package/dist/types/services/AiMentorService.d.ts +23 -0
  11. package/package.json +1 -1
  12. package/src/core/OpenAPI.ts +1 -1
  13. package/src/index.ts +1 -39
  14. package/src/models/{WhatAppWebHook.ts → SessionMemoryAttachment.ts} +2 -2
  15. package/src/services/AiAccountService.ts +135 -0
  16. package/src/services/AiMentorService.ts +60 -0
  17. package/dist/types/models/Bot.d.ts +0 -15
  18. package/dist/types/models/BotCommand.d.ts +0 -6
  19. package/dist/types/models/BotCreate.d.ts +0 -12
  20. package/dist/types/models/DataSet.d.ts +0 -21
  21. package/dist/types/models/DataSetCreate.d.ts +0 -12
  22. package/dist/types/models/DataSetStatusEnum.d.ts +0 -12
  23. package/dist/types/models/DiscordConfig.d.ts +0 -7
  24. package/dist/types/models/DiscordUserConfig.d.ts +0 -10
  25. package/dist/types/models/DiscordWebhook.d.ts +0 -6
  26. package/dist/types/models/PaginatedDataSetList.d.ts +0 -7
  27. package/dist/types/models/PaginatedTrainingList.d.ts +0 -7
  28. package/dist/types/models/PatchedBotCommand.d.ts +0 -6
  29. package/dist/types/models/PatchedBotCreate.d.ts +0 -12
  30. package/dist/types/models/PatchedDataSet.d.ts +0 -21
  31. package/dist/types/models/PatchedDiscordConfig.d.ts +0 -7
  32. package/dist/types/models/PatchedDiscordUserConfig.d.ts +0 -10
  33. package/dist/types/models/PatchedSlackConfig.d.ts +0 -8
  34. package/dist/types/models/PatchedSlackUserConfig.d.ts +0 -17
  35. package/dist/types/models/PatchedTeamsConfig.d.ts +0 -7
  36. package/dist/types/models/PatchedTrainingCreate.d.ts +0 -31
  37. package/dist/types/models/PatchedWebexConfig.d.ts +0 -10
  38. package/dist/types/models/PatchedWhatsappConfig.d.ts +0 -11
  39. package/dist/types/models/PatchedWhatsappUserConfig.d.ts +0 -10
  40. package/dist/types/models/Provider05cEnum.d.ts +0 -14
  41. package/dist/types/models/Provider63aEnum.d.ts +0 -6
  42. package/dist/types/models/SlackConfig.d.ts +0 -8
  43. package/dist/types/models/SlackUserConfig.d.ts +0 -17
  44. package/dist/types/models/SlackWebhook.d.ts +0 -6
  45. package/dist/types/models/TeamsConfig.d.ts +0 -7
  46. package/dist/types/models/TeamsWebhook.d.ts +0 -17
  47. package/dist/types/models/Training.d.ts +0 -41
  48. package/dist/types/models/TrainingCreate.d.ts +0 -31
  49. package/dist/types/models/WebexConfig.d.ts +0 -10
  50. package/dist/types/models/WebexWebhook.d.ts +0 -4
  51. package/dist/types/models/WhatAppWebHook.d.ts +0 -3
  52. package/dist/types/models/WhatsappConfig.d.ts +0 -11
  53. package/dist/types/models/WhatsappUserConfig.d.ts +0 -10
  54. package/dist/types/services/AiBotService.d.ts +0 -642
  55. package/dist/types/services/AiFinetuningService.d.ts +0 -232
  56. package/src/models/Bot.ts +0 -20
  57. package/src/models/BotCommand.ts +0 -11
  58. package/src/models/BotCreate.ts +0 -17
  59. package/src/models/DataSet.ts +0 -26
  60. package/src/models/DataSetCreate.ts +0 -17
  61. package/src/models/DataSetStatusEnum.ts +0 -16
  62. package/src/models/DiscordConfig.ts +0 -12
  63. package/src/models/DiscordUserConfig.ts +0 -15
  64. package/src/models/DiscordWebhook.ts +0 -11
  65. package/src/models/PaginatedDataSetList.ts +0 -12
  66. package/src/models/PaginatedTrainingList.ts +0 -12
  67. package/src/models/PatchedBotCommand.ts +0 -11
  68. package/src/models/PatchedBotCreate.ts +0 -17
  69. package/src/models/PatchedDataSet.ts +0 -26
  70. package/src/models/PatchedDiscordConfig.ts +0 -12
  71. package/src/models/PatchedDiscordUserConfig.ts +0 -15
  72. package/src/models/PatchedSlackConfig.ts +0 -13
  73. package/src/models/PatchedSlackUserConfig.ts +0 -22
  74. package/src/models/PatchedTeamsConfig.ts +0 -12
  75. package/src/models/PatchedTrainingCreate.ts +0 -36
  76. package/src/models/PatchedWebexConfig.ts +0 -15
  77. package/src/models/PatchedWhatsappConfig.ts +0 -16
  78. package/src/models/PatchedWhatsappUserConfig.ts +0 -15
  79. package/src/models/Provider05cEnum.ts +0 -18
  80. package/src/models/Provider63aEnum.ts +0 -10
  81. package/src/models/SlackConfig.ts +0 -13
  82. package/src/models/SlackUserConfig.ts +0 -22
  83. package/src/models/SlackWebhook.ts +0 -11
  84. package/src/models/TeamsConfig.ts +0 -12
  85. package/src/models/TeamsWebhook.ts +0 -22
  86. package/src/models/Training.ts +0 -46
  87. package/src/models/TrainingCreate.ts +0 -36
  88. package/src/models/WebexConfig.ts +0 -15
  89. package/src/models/WebexWebhook.ts +0 -9
  90. package/src/models/WhatsappConfig.ts +0 -16
  91. package/src/models/WhatsappUserConfig.ts +0 -15
  92. package/src/services/AiBotService.ts +0 -1330
  93. 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.0-ai-plus',
113
+ VERSION: '4.6.1-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 */
@@ -1453,6 +1403,127 @@ class AiAccountService {
1453
1403
  }
1454
1404
  });
1455
1405
  }
1406
+ /**
1407
+ * Retrieve LLM credentials for an organization.
1408
+ *
1409
+ * Query Parameters:
1410
+ * name (optional): Filter results by LLM provider name
1411
+ *
1412
+ * Args:
1413
+ * request: The HTTP request
1414
+ * org: Organization key identifier
1415
+ *
1416
+ * Returns:
1417
+ * Response: List of LLM credentials for the organization
1418
+ *
1419
+ * Raises:
1420
+ * NotFound: When organization is not found or when no credentials match the filters
1421
+ * ValidationError: When query parameters are invalid
1422
+ * @returns LLMCredentialResponse
1423
+ * @throws ApiError
1424
+ */
1425
+ static aiAccountOrgsLlmCredentialRetrieve({
1426
+ org,
1427
+ name
1428
+ }) {
1429
+ return request(OpenAPI, {
1430
+ method: 'GET',
1431
+ url: '/api/ai-account/orgs/{org}/llm-credential/',
1432
+ path: {
1433
+ 'org': org
1434
+ },
1435
+ query: {
1436
+ 'name': name
1437
+ }
1438
+ });
1439
+ }
1440
+ /**
1441
+ * Create a new LLM credential for an organization.
1442
+ *
1443
+ * Args:
1444
+ * request: The HTTP request containing credential information
1445
+ * org: Organization key identifier
1446
+ *
1447
+ * Returns:
1448
+ * Response: Created LLM credential
1449
+ *
1450
+ * Raises:
1451
+ * NotFound: When organization is not found
1452
+ * ValidationError: When request data is invalid
1453
+ * @returns LLMCredentialResponse
1454
+ * @throws ApiError
1455
+ */
1456
+ static aiAccountOrgsLlmCredentialCreate({
1457
+ org,
1458
+ requestBody
1459
+ }) {
1460
+ return request(OpenAPI, {
1461
+ method: 'POST',
1462
+ url: '/api/ai-account/orgs/{org}/llm-credential/',
1463
+ path: {
1464
+ 'org': org
1465
+ },
1466
+ body: requestBody,
1467
+ mediaType: 'application/json'
1468
+ });
1469
+ }
1470
+ /**
1471
+ * Update an existing LLM credential for an organization.
1472
+ *
1473
+ * Args:
1474
+ * request: The HTTP request containing updated credential information
1475
+ * org: Organization key identifier
1476
+ *
1477
+ * Returns:
1478
+ * Response: Updated LLM credential
1479
+ *
1480
+ * Raises:
1481
+ * NotFound: When organization or credential is not found
1482
+ * ValidationError: When request data is invalid
1483
+ * @returns LLMCredentialResponse
1484
+ * @throws ApiError
1485
+ */
1486
+ static aiAccountOrgsLlmCredentialPartialUpdate({
1487
+ org,
1488
+ requestBody
1489
+ }) {
1490
+ return request(OpenAPI, {
1491
+ method: 'PATCH',
1492
+ url: '/api/ai-account/orgs/{org}/llm-credential/',
1493
+ path: {
1494
+ 'org': org
1495
+ },
1496
+ body: requestBody,
1497
+ mediaType: 'application/json'
1498
+ });
1499
+ }
1500
+ /**
1501
+ * Delete an existing LLM credential for an organization.
1502
+ *
1503
+ * Args:
1504
+ * request: The HTTP request containing credential information (must include 'name')
1505
+ * org: Organization key identifier
1506
+ *
1507
+ * Returns:
1508
+ * Response: 204
1509
+ *
1510
+ * Raises:
1511
+ * NotFound: When organization or credential is not found
1512
+ * ValidationError: When request data is invalid
1513
+ * @returns void
1514
+ * @throws ApiError
1515
+ */
1516
+ static aiAccountOrgsLlmCredentialDestroy({
1517
+ org
1518
+ }) {
1519
+ return request(OpenAPI, {
1520
+ method: 'DELETE',
1521
+ url: '/api/ai-account/orgs/{org}/llm-credential/',
1522
+ path: {
1523
+ 'org': org
1524
+ }
1525
+ });
1526
+ }
1456
1527
  /**
1457
1528
  * Enable or disable the use of main LLM credentials for an organization.
1458
1529
  *
@@ -9220,1738 +9291,397 @@ class AiAnalyticsService {
9220
9291
  }
9221
9292
  }
9222
9293
 
9223
- class AiBotService {
9294
+ class AiIndexService {
9224
9295
  /**
9225
- * Create modify and update bot information for a specific tenant.
9226
- * @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
9227
9312
  * @throws ApiError
9228
9313
  */
9229
- static aiBotV1BotsBotList({
9230
- org
9314
+ static aiIndexOrgsUsersDocumentsRetrieve({
9315
+ documentId,
9316
+ org,
9317
+ userId
9231
9318
  }) {
9232
9319
  return request(OpenAPI, {
9233
9320
  method: 'GET',
9234
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9321
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9235
9322
  path: {
9236
- 'org': org
9323
+ 'document_id': documentId,
9324
+ 'org': org,
9325
+ 'user_id': userId
9326
+ },
9327
+ errors: {
9328
+ 404: `Document not found`
9237
9329
  }
9238
9330
  });
9239
9331
  }
9240
9332
  /**
9241
- * Create modify and update bot information for a specific tenant.
9242
- * @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
9243
9350
  * @throws ApiError
9244
9351
  */
9245
- static aiBotV1BotsBotCreate({
9352
+ static aiIndexOrgsUsersDocumentsUpdate({
9353
+ documentId,
9246
9354
  org,
9247
- requestBody
9355
+ userId,
9356
+ formData
9248
9357
  }) {
9249
9358
  return request(OpenAPI, {
9250
- method: 'POST',
9251
- url: '/api/ai-bot/v1/bots/{org}/bot/',
9359
+ method: 'PUT',
9360
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
9252
9361
  path: {
9253
- 'org': org
9362
+ 'document_id': documentId,
9363
+ 'org': org,
9364
+ 'user_id': userId
9254
9365
  },
9255
- body: requestBody,
9256
- mediaType: 'application/json'
9257
- });
9258
- }
9259
- /**
9260
- * Create slash commands for a specific bot
9261
- * eg. /iblai-baseline
9262
- * @returns BotCommand
9263
- * @throws ApiError
9264
- */
9265
- static aiBotV1BotsBotCommandsList({
9266
- org
9267
- }) {
9268
- return request(OpenAPI, {
9269
- method: 'GET',
9270
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
9271
- path: {
9272
- 'org': org
9366
+ formData: formData,
9367
+ mediaType: 'multipart/form-data',
9368
+ errors: {
9369
+ 400: `Invalid request data`,
9370
+ 404: `Document not found`
9273
9371
  }
9274
9372
  });
9275
9373
  }
9276
9374
  /**
9277
- * Create slash commands for a specific bot
9278
- * eg. /iblai-baseline
9279
- * @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
9280
9391
  * @throws ApiError
9281
9392
  */
9282
- static aiBotV1BotsBotCommandsCreate({
9393
+ static aiIndexOrgsUsersDocumentsDestroy({
9394
+ documentId,
9283
9395
  org,
9284
- requestBody
9396
+ userId
9285
9397
  }) {
9286
9398
  return request(OpenAPI, {
9287
- method: 'POST',
9288
- 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}/',
9289
9401
  path: {
9290
- 'org': org
9402
+ 'document_id': documentId,
9403
+ 'org': org,
9404
+ 'user_id': userId
9291
9405
  },
9292
- body: requestBody,
9293
- mediaType: 'application/json'
9406
+ errors: {
9407
+ 404: `Document not found`
9408
+ }
9294
9409
  });
9295
9410
  }
9296
9411
  /**
9297
- * Create slash commands for a specific bot
9298
- * eg. /iblai-baseline
9299
- * @returns BotCommand
9412
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9413
+ * @returns DocumentSettingsResponse
9300
9414
  * @throws ApiError
9301
9415
  */
9302
- static aiBotV1BotsBotCommandsRetrieve({
9303
- id,
9304
- org
9416
+ static aiIndexOrgsUsersDocumentsSettingsRetrieve({
9417
+ documentId,
9418
+ org,
9419
+ userId
9305
9420
  }) {
9306
9421
  return request(OpenAPI, {
9307
9422
  method: 'GET',
9308
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9423
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
9309
9424
  path: {
9310
- 'id': id,
9311
- 'org': org
9425
+ 'document_id': documentId,
9426
+ 'org': org,
9427
+ 'user_id': userId
9312
9428
  }
9313
9429
  });
9314
9430
  }
9315
9431
  /**
9316
- * Create slash commands for a specific bot
9317
- * eg. /iblai-baseline
9318
- * @returns BotCommand
9432
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
9433
+ * @returns DocumentSettingsResponse
9319
9434
  * @throws ApiError
9320
9435
  */
9321
- static aiBotV1BotsBotCommandsUpdate({
9322
- id,
9436
+ static aiIndexOrgsUsersDocumentsSettingsCreate({
9437
+ documentId,
9323
9438
  org,
9439
+ userId,
9324
9440
  requestBody
9325
9441
  }) {
9326
9442
  return request(OpenAPI, {
9327
- method: 'PUT',
9328
- 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/',
9329
9445
  path: {
9330
- 'id': id,
9331
- 'org': org
9446
+ 'document_id': documentId,
9447
+ 'org': org,
9448
+ 'user_id': userId
9332
9449
  },
9333
9450
  body: requestBody,
9334
9451
  mediaType: 'application/json'
9335
9452
  });
9336
9453
  }
9337
9454
  /**
9338
- * Create slash commands for a specific bot
9339
- * eg. /iblai-baseline
9340
- * @returns BotCommand
9341
- * @throws ApiError
9342
- */
9343
- static aiBotV1BotsBotCommandsPartialUpdate({
9344
- 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({
9345
9488
  org,
9346
- requestBody
9347
- }) {
9348
- return request(OpenAPI, {
9349
- method: 'PATCH',
9350
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9351
- path: {
9352
- 'id': id,
9353
- 'org': org
9354
- },
9355
- body: requestBody,
9356
- mediaType: 'application/json'
9357
- });
9358
- }
9359
- /**
9360
- * Create slash commands for a specific bot
9361
- * eg. /iblai-baseline
9362
- * @returns void
9363
- * @throws ApiError
9364
- */
9365
- static aiBotV1BotsBotCommandsDestroy({
9366
- id,
9367
- org
9368
- }) {
9369
- return request(OpenAPI, {
9370
- method: 'DELETE',
9371
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
9372
- path: {
9373
- 'id': id,
9374
- 'org': org
9375
- }
9376
- });
9377
- }
9378
- /**
9379
- * Create modify and update bot information for a specific tenant.
9380
- * @returns Bot
9381
- * @throws ApiError
9382
- */
9383
- static aiBotV1BotsBotRetrieve({
9384
- id,
9385
- org
9489
+ pathway,
9490
+ userId,
9491
+ limit,
9492
+ offset,
9493
+ search
9386
9494
  }) {
9387
9495
  return request(OpenAPI, {
9388
9496
  method: 'GET',
9389
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9497
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
9390
9498
  path: {
9391
- 'id': id,
9392
- 'org': org
9499
+ 'org': org,
9500
+ 'pathway': pathway,
9501
+ 'user_id': userId
9502
+ },
9503
+ query: {
9504
+ 'limit': limit,
9505
+ 'offset': offset,
9506
+ 'search': search
9393
9507
  }
9394
9508
  });
9395
9509
  }
9396
9510
  /**
9397
- * Create modify and update bot information for a specific tenant.
9398
- * @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
9399
9526
  * @throws ApiError
9400
9527
  */
9401
- static aiBotV1BotsBotUpdate({
9402
- id,
9528
+ static aiIndexOrgsUsersDocumentsSearchCreate({
9403
9529
  org,
9530
+ userId,
9404
9531
  requestBody
9405
9532
  }) {
9406
9533
  return request(OpenAPI, {
9407
- method: 'PUT',
9408
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9534
+ method: 'POST',
9535
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
9409
9536
  path: {
9410
- 'id': id,
9411
- 'org': org
9537
+ 'org': org,
9538
+ 'user_id': userId
9412
9539
  },
9413
9540
  body: requestBody,
9414
- mediaType: 'application/json'
9541
+ mediaType: 'application/json',
9542
+ errors: {
9543
+ 400: `Invalid request data`
9544
+ }
9415
9545
  });
9416
9546
  }
9417
9547
  /**
9418
- * Create modify and update bot information for a specific tenant.
9419
- * @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
9420
9564
  * @throws ApiError
9421
9565
  */
9422
- static aiBotV1BotsBotPartialUpdate({
9423
- id,
9566
+ static aiIndexOrgsUsersDocumentsSourcesCreate({
9424
9567
  org,
9568
+ userId,
9425
9569
  requestBody
9426
9570
  }) {
9427
9571
  return request(OpenAPI, {
9428
- method: 'PATCH',
9429
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9572
+ method: 'POST',
9573
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
9430
9574
  path: {
9431
- 'id': id,
9432
- 'org': org
9575
+ 'org': org,
9576
+ 'user_id': userId
9433
9577
  },
9434
9578
  body: requestBody,
9435
- mediaType: 'application/json'
9579
+ mediaType: 'application/json',
9580
+ errors: {
9581
+ 400: `Invalid request data`
9582
+ }
9436
9583
  });
9437
9584
  }
9438
9585
  /**
9439
- * Create modify and update bot information for a specific tenant.
9440
- * @returns void
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
9441
9600
  * @throws ApiError
9442
9601
  */
9443
- static aiBotV1BotsBotDestroy({
9444
- id,
9445
- org
9602
+ static aiIndexOrgsUsersDocumentsTasksRetrieve({
9603
+ org,
9604
+ taskId,
9605
+ userId
9446
9606
  }) {
9447
9607
  return request(OpenAPI, {
9448
- method: 'DELETE',
9449
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
9608
+ method: 'GET',
9609
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
9450
9610
  path: {
9451
- 'id': id,
9452
- 'org': org
9611
+ 'org': org,
9612
+ 'task_id': taskId,
9613
+ 'user_id': userId
9453
9614
  }
9454
9615
  });
9455
9616
  }
9456
9617
  /**
9457
- * Create modify and update bot information for a specific tenant.
9458
- * @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
9459
9636
  * @throws ApiError
9460
9637
  */
9461
- static aiBotV1BotsBotConfigDiscordRetrieve({
9462
- id,
9463
- org
9638
+ static aiIndexOrgsUsersDocumentsTrainCreate({
9639
+ org,
9640
+ userId,
9641
+ formData
9464
9642
  }) {
9465
9643
  return request(OpenAPI, {
9466
- method: 'GET',
9467
- 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/',
9468
9646
  path: {
9469
- 'id': id,
9470
- 'org': org
9647
+ 'org': org,
9648
+ 'user_id': userId
9649
+ },
9650
+ formData: formData,
9651
+ mediaType: 'multipart/form-data',
9652
+ errors: {
9653
+ 400: `Invalid request data`
9471
9654
  }
9472
9655
  });
9473
9656
  }
9474
9657
  /**
9475
- * Create modify and update bot information for a specific tenant.
9476
- * @returns DiscordConfig
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
9477
9675
  * @throws ApiError
9478
9676
  */
9479
- static aiBotV1BotsBotConfigDiscordPartialUpdate({
9480
- id,
9677
+ static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
9481
9678
  org,
9482
- requestBody
9679
+ userId,
9680
+ formData
9483
9681
  }) {
9484
9682
  return request(OpenAPI, {
9485
- method: 'PATCH',
9486
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
9487
- path: {
9488
- 'id': id,
9489
- 'org': org
9490
- },
9491
- body: requestBody,
9492
- mediaType: 'application/json'
9493
- });
9494
- }
9495
- /**
9496
- * Create modify and update bot information for a specific tenant.
9497
- * @returns SlackConfig
9498
- * @throws ApiError
9499
- */
9500
- static aiBotV1BotsBotConfigSlackRetrieve({
9501
- id,
9502
- org
9503
- }) {
9504
- return request(OpenAPI, {
9505
- method: 'GET',
9506
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/',
9507
- path: {
9508
- 'id': id,
9509
- 'org': org
9510
- }
9511
- });
9512
- }
9513
- /**
9514
- * Create modify and update bot information for a specific tenant.
9515
- * @returns SlackConfig
9516
- * @throws ApiError
9517
- */
9518
- static aiBotV1BotsBotConfigSlackUpdateCreate({
9519
- id,
9520
- org,
9521
- requestBody
9522
- }) {
9523
- return request(OpenAPI, {
9524
- method: 'POST',
9525
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9526
- path: {
9527
- 'id': id,
9528
- 'org': org
9529
- },
9530
- body: requestBody,
9531
- mediaType: 'application/json'
9532
- });
9533
- }
9534
- /**
9535
- * Create modify and update bot information for a specific tenant.
9536
- * @returns SlackConfig
9537
- * @throws ApiError
9538
- */
9539
- static aiBotV1BotsBotConfigSlackUpdateUpdate({
9540
- id,
9541
- org,
9542
- requestBody
9543
- }) {
9544
- return request(OpenAPI, {
9545
- method: 'PUT',
9546
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9547
- path: {
9548
- 'id': id,
9549
- 'org': org
9550
- },
9551
- body: requestBody,
9552
- mediaType: 'application/json'
9553
- });
9554
- }
9555
- /**
9556
- * Create modify and update bot information for a specific tenant.
9557
- * @returns SlackConfig
9558
- * @throws ApiError
9559
- */
9560
- static aiBotV1BotsBotConfigSlackUpdatePartialUpdate({
9561
- id,
9562
- org,
9563
- requestBody
9564
- }) {
9565
- return request(OpenAPI, {
9566
- method: 'PATCH',
9567
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
9568
- path: {
9569
- 'id': id,
9570
- 'org': org
9571
- },
9572
- body: requestBody,
9573
- mediaType: 'application/json'
9574
- });
9575
- }
9576
- /**
9577
- * Create modify and update bot information for a specific tenant.
9578
- * @returns TeamsConfig
9579
- * @throws ApiError
9580
- */
9581
- static aiBotV1BotsBotConfigTeamsRetrieve({
9582
- id,
9583
- org
9584
- }) {
9585
- return request(OpenAPI, {
9586
- method: 'GET',
9587
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/',
9588
- path: {
9589
- 'id': id,
9590
- 'org': org
9591
- }
9592
- });
9593
- }
9594
- /**
9595
- * Create modify and update bot information for a specific tenant.
9596
- * @returns TeamsConfig
9597
- * @throws ApiError
9598
- */
9599
- static aiBotV1BotsBotConfigTeamsUpdateCreate({
9600
- id,
9601
- org,
9602
- requestBody
9603
- }) {
9604
- return request(OpenAPI, {
9605
- method: 'POST',
9606
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9607
- path: {
9608
- 'id': id,
9609
- 'org': org
9610
- },
9611
- body: requestBody,
9612
- mediaType: 'application/json'
9613
- });
9614
- }
9615
- /**
9616
- * Create modify and update bot information for a specific tenant.
9617
- * @returns TeamsConfig
9618
- * @throws ApiError
9619
- */
9620
- static aiBotV1BotsBotConfigTeamsUpdateUpdate({
9621
- id,
9622
- org,
9623
- requestBody
9624
- }) {
9625
- return request(OpenAPI, {
9626
- method: 'PUT',
9627
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9628
- path: {
9629
- 'id': id,
9630
- 'org': org
9631
- },
9632
- body: requestBody,
9633
- mediaType: 'application/json'
9634
- });
9635
- }
9636
- /**
9637
- * Create modify and update bot information for a specific tenant.
9638
- * @returns TeamsConfig
9639
- * @throws ApiError
9640
- */
9641
- static aiBotV1BotsBotConfigTeamsUpdatePartialUpdate({
9642
- id,
9643
- org,
9644
- requestBody
9645
- }) {
9646
- return request(OpenAPI, {
9647
- method: 'PATCH',
9648
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
9649
- path: {
9650
- 'id': id,
9651
- 'org': org
9652
- },
9653
- body: requestBody,
9654
- mediaType: 'application/json'
9655
- });
9656
- }
9657
- /**
9658
- * Create modify and update bot information for a specific tenant.
9659
- * @returns WebexConfig
9660
- * @throws ApiError
9661
- */
9662
- static aiBotV1BotsBotConfigWebexRetrieve({
9663
- id,
9664
- org
9665
- }) {
9666
- return request(OpenAPI, {
9667
- method: 'GET',
9668
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9669
- path: {
9670
- 'id': id,
9671
- 'org': org
9672
- }
9673
- });
9674
- }
9675
- /**
9676
- * Create modify and update bot information for a specific tenant.
9677
- * @returns WebexConfig
9678
- * @throws ApiError
9679
- */
9680
- static aiBotV1BotsBotConfigWebexPartialUpdate({
9681
- id,
9682
- org,
9683
- requestBody
9684
- }) {
9685
- return request(OpenAPI, {
9686
- method: 'PATCH',
9687
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
9688
- path: {
9689
- 'id': id,
9690
- 'org': org
9691
- },
9692
- body: requestBody,
9693
- mediaType: 'application/json'
9694
- });
9695
- }
9696
- /**
9697
- * Create modify and update bot information for a specific tenant.
9698
- * @returns WhatsappConfig
9699
- * @throws ApiError
9700
- */
9701
- static aiBotV1BotsBotConfigWhatsappRetrieve({
9702
- id,
9703
- org
9704
- }) {
9705
- return request(OpenAPI, {
9706
- method: 'GET',
9707
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/whatsapp/',
9708
- path: {
9709
- 'id': id,
9710
- 'org': org
9711
- }
9712
- });
9713
- }
9714
- /**
9715
- * Create modify and update bot information for a specific tenant.
9716
- * @returns WhatsappConfig
9717
- * @throws ApiError
9718
- */
9719
- static aiBotV1BotsBotWhatsappConfigUpdate({
9720
- id,
9721
- org,
9722
- requestBody
9723
- }) {
9724
- return request(OpenAPI, {
9725
- method: 'PUT',
9726
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9727
- path: {
9728
- 'id': id,
9729
- 'org': org
9730
- },
9731
- body: requestBody,
9732
- mediaType: 'application/json'
9733
- });
9734
- }
9735
- /**
9736
- * Create modify and update bot information for a specific tenant.
9737
- * @returns WhatsappConfig
9738
- * @throws ApiError
9739
- */
9740
- static aiBotV1BotsBotWhatsappConfigPartialUpdate({
9741
- id,
9742
- org,
9743
- requestBody
9744
- }) {
9745
- return request(OpenAPI, {
9746
- method: 'PATCH',
9747
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
9748
- path: {
9749
- 'id': id,
9750
- 'org': org
9751
- },
9752
- body: requestBody,
9753
- mediaType: 'application/json'
9754
- });
9755
- }
9756
- /**
9757
- * Setup discord user id linkage with discord bots
9758
- * this will be used to authenticate the user when interracting with discord bots.
9759
- * the user id can be copied from the discord app after tapping on the user profile.
9760
- * @returns DiscordUserConfig
9761
- * @throws ApiError
9762
- */
9763
- static aiBotV1BotsDiscordUserConfigList({
9764
- org
9765
- }) {
9766
- return request(OpenAPI, {
9767
- method: 'GET',
9768
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9769
- path: {
9770
- 'org': org
9771
- }
9772
- });
9773
- }
9774
- /**
9775
- * Setup discord user id linkage with discord bots
9776
- * this will be used to authenticate the user when interracting with discord bots.
9777
- * the user id can be copied from the discord app after tapping on the user profile.
9778
- * @returns DiscordUserConfig
9779
- * @throws ApiError
9780
- */
9781
- static aiBotV1BotsDiscordUserConfigCreate({
9782
- org,
9783
- requestBody
9784
- }) {
9785
- return request(OpenAPI, {
9786
- method: 'POST',
9787
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
9788
- path: {
9789
- 'org': org
9790
- },
9791
- body: requestBody,
9792
- mediaType: 'application/json'
9793
- });
9794
- }
9795
- /**
9796
- * Setup discord user id linkage with discord bots
9797
- * this will be used to authenticate the user when interracting with discord bots.
9798
- * the user id can be copied from the discord app after tapping on the user profile.
9799
- * @returns DiscordUserConfig
9800
- * @throws ApiError
9801
- */
9802
- static aiBotV1BotsDiscordUserConfigRetrieve({
9803
- id,
9804
- org
9805
- }) {
9806
- return request(OpenAPI, {
9807
- method: 'GET',
9808
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9809
- path: {
9810
- 'id': id,
9811
- 'org': org
9812
- }
9813
- });
9814
- }
9815
- /**
9816
- * Setup discord user id linkage with discord bots
9817
- * this will be used to authenticate the user when interracting with discord bots.
9818
- * the user id can be copied from the discord app after tapping on the user profile.
9819
- * @returns DiscordUserConfig
9820
- * @throws ApiError
9821
- */
9822
- static aiBotV1BotsDiscordUserConfigUpdate({
9823
- id,
9824
- org,
9825
- requestBody
9826
- }) {
9827
- return request(OpenAPI, {
9828
- method: 'PUT',
9829
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9830
- path: {
9831
- 'id': id,
9832
- 'org': org
9833
- },
9834
- body: requestBody,
9835
- mediaType: 'application/json'
9836
- });
9837
- }
9838
- /**
9839
- * Setup discord user id linkage with discord bots
9840
- * this will be used to authenticate the user when interracting with discord bots.
9841
- * the user id can be copied from the discord app after tapping on the user profile.
9842
- * @returns DiscordUserConfig
9843
- * @throws ApiError
9844
- */
9845
- static aiBotV1BotsDiscordUserConfigPartialUpdate({
9846
- id,
9847
- org,
9848
- requestBody
9849
- }) {
9850
- return request(OpenAPI, {
9851
- method: 'PATCH',
9852
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9853
- path: {
9854
- 'id': id,
9855
- 'org': org
9856
- },
9857
- body: requestBody,
9858
- mediaType: 'application/json'
9859
- });
9860
- }
9861
- /**
9862
- * Setup discord user id linkage with discord bots
9863
- * this will be used to authenticate the user when interracting with discord bots.
9864
- * the user id can be copied from the discord app after tapping on the user profile.
9865
- * @returns void
9866
- * @throws ApiError
9867
- */
9868
- static aiBotV1BotsDiscordUserConfigDestroy({
9869
- id,
9870
- org
9871
- }) {
9872
- return request(OpenAPI, {
9873
- method: 'DELETE',
9874
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
9875
- path: {
9876
- 'id': id,
9877
- 'org': org
9878
- }
9879
- });
9880
- }
9881
- /**
9882
- * Setup slack username and domain linkage with slack bots
9883
- * this will be used to authenticate the user when interracting with slack bots.
9884
- * @returns SlackUserConfig
9885
- * @throws ApiError
9886
- */
9887
- static aiBotV1BotsSlackUserConfigList({
9888
- org
9889
- }) {
9890
- return request(OpenAPI, {
9891
- method: 'GET',
9892
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
9893
- path: {
9894
- 'org': org
9895
- }
9896
- });
9897
- }
9898
- /**
9899
- * Setup slack username and domain linkage with slack bots
9900
- * this will be used to authenticate the user when interracting with slack bots.
9901
- * @returns SlackUserConfig
9902
- * @throws ApiError
9903
- */
9904
- static aiBotV1BotsSlackUserConfigCreate({
9905
- org,
9906
- requestBody
9907
- }) {
9908
- return request(OpenAPI, {
9909
- method: 'POST',
9910
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
9911
- path: {
9912
- 'org': org
9913
- },
9914
- body: requestBody,
9915
- mediaType: 'application/json'
9916
- });
9917
- }
9918
- /**
9919
- * Setup slack username and domain linkage with slack bots
9920
- * this will be used to authenticate the user when interracting with slack bots.
9921
- * @returns SlackUserConfig
9922
- * @throws ApiError
9923
- */
9924
- static aiBotV1BotsSlackUserConfigRetrieve({
9925
- id,
9926
- org
9927
- }) {
9928
- return request(OpenAPI, {
9929
- method: 'GET',
9930
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9931
- path: {
9932
- 'id': id,
9933
- 'org': org
9934
- }
9935
- });
9936
- }
9937
- /**
9938
- * Setup slack username and domain linkage with slack bots
9939
- * this will be used to authenticate the user when interracting with slack bots.
9940
- * @returns SlackUserConfig
9941
- * @throws ApiError
9942
- */
9943
- static aiBotV1BotsSlackUserConfigUpdate({
9944
- id,
9945
- org,
9946
- requestBody
9947
- }) {
9948
- return request(OpenAPI, {
9949
- method: 'PUT',
9950
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9951
- path: {
9952
- 'id': id,
9953
- 'org': org
9954
- },
9955
- body: requestBody,
9956
- mediaType: 'application/json'
9957
- });
9958
- }
9959
- /**
9960
- * Setup slack username and domain linkage with slack bots
9961
- * this will be used to authenticate the user when interracting with slack bots.
9962
- * @returns SlackUserConfig
9963
- * @throws ApiError
9964
- */
9965
- static aiBotV1BotsSlackUserConfigPartialUpdate({
9966
- id,
9967
- org,
9968
- requestBody
9969
- }) {
9970
- return request(OpenAPI, {
9971
- method: 'PATCH',
9972
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9973
- path: {
9974
- 'id': id,
9975
- 'org': org
9976
- },
9977
- body: requestBody,
9978
- mediaType: 'application/json'
9979
- });
9980
- }
9981
- /**
9982
- * Setup slack username and domain linkage with slack bots
9983
- * this will be used to authenticate the user when interracting with slack bots.
9984
- * @returns void
9985
- * @throws ApiError
9986
- */
9987
- static aiBotV1BotsSlackUserConfigDestroy({
9988
- id,
9989
- org
9990
- }) {
9991
- return request(OpenAPI, {
9992
- method: 'DELETE',
9993
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
9994
- path: {
9995
- 'id': id,
9996
- 'org': org
9997
- }
9998
- });
9999
- }
10000
- /**
10001
- * Setup phone number linkage with whatsapp bots
10002
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10003
- * @returns WhatsappUserConfig
10004
- * @throws ApiError
10005
- */
10006
- static aiBotV1BotsWhatsappUserConfigList({
10007
- org
10008
- }) {
10009
- return request(OpenAPI, {
10010
- method: 'GET',
10011
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
10012
- path: {
10013
- 'org': org
10014
- }
10015
- });
10016
- }
10017
- /**
10018
- * Setup phone number linkage with whatsapp bots
10019
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10020
- * @returns WhatsappUserConfig
10021
- * @throws ApiError
10022
- */
10023
- static aiBotV1BotsWhatsappUserConfigCreate({
10024
- org,
10025
- requestBody
10026
- }) {
10027
- return request(OpenAPI, {
10028
- method: 'POST',
10029
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
10030
- path: {
10031
- 'org': org
10032
- },
10033
- body: requestBody,
10034
- mediaType: 'application/json'
10035
- });
10036
- }
10037
- /**
10038
- * Setup phone number linkage with whatsapp bots
10039
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10040
- * @returns WhatsappUserConfig
10041
- * @throws ApiError
10042
- */
10043
- static aiBotV1BotsWhatsappUserConfigRetrieve({
10044
- id,
10045
- org
10046
- }) {
10047
- return request(OpenAPI, {
10048
- method: 'GET',
10049
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10050
- path: {
10051
- 'id': id,
10052
- 'org': org
10053
- }
10054
- });
10055
- }
10056
- /**
10057
- * Setup phone number linkage with whatsapp bots
10058
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10059
- * @returns WhatsappUserConfig
10060
- * @throws ApiError
10061
- */
10062
- static aiBotV1BotsWhatsappUserConfigUpdate({
10063
- id,
10064
- org,
10065
- requestBody
10066
- }) {
10067
- return request(OpenAPI, {
10068
- method: 'PUT',
10069
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10070
- path: {
10071
- 'id': id,
10072
- 'org': org
10073
- },
10074
- body: requestBody,
10075
- mediaType: 'application/json'
10076
- });
10077
- }
10078
- /**
10079
- * Setup phone number linkage with whatsapp bots
10080
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10081
- * @returns WhatsappUserConfig
10082
- * @throws ApiError
10083
- */
10084
- static aiBotV1BotsWhatsappUserConfigPartialUpdate({
10085
- id,
10086
- org,
10087
- requestBody
10088
- }) {
10089
- return request(OpenAPI, {
10090
- method: 'PATCH',
10091
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10092
- path: {
10093
- 'id': id,
10094
- 'org': org
10095
- },
10096
- body: requestBody,
10097
- mediaType: 'application/json'
10098
- });
10099
- }
10100
- /**
10101
- * Setup phone number linkage with whatsapp bots
10102
- * This phone number will be used to authenticate and allow access to whatsapp bots.
10103
- * @returns void
10104
- * @throws ApiError
10105
- */
10106
- static aiBotV1BotsWhatsappUserConfigDestroy({
10107
- id,
10108
- org
10109
- }) {
10110
- return request(OpenAPI, {
10111
- method: 'DELETE',
10112
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
10113
- path: {
10114
- 'id': id,
10115
- 'org': org
10116
- }
10117
- });
10118
- }
10119
- /**
10120
- * Webhook endpoint to receive and process discord messages.
10121
- * @returns DiscordWebhook
10122
- * @throws ApiError
10123
- */
10124
- static aiBotV1BotsWebhooksDiscordCreate({
10125
- name,
10126
- org,
10127
- requestBody
10128
- }) {
10129
- return request(OpenAPI, {
10130
- method: 'POST',
10131
- url: '/api/ai-bot/v1/bots/webhooks/{org}/discord/{name}/',
10132
- path: {
10133
- 'name': name,
10134
- 'org': org
10135
- },
10136
- body: requestBody,
10137
- mediaType: 'application/json'
10138
- });
10139
- }
10140
- /**
10141
- * @returns SlackWebhook
10142
- * @throws ApiError
10143
- */
10144
- static aiBotV1BotsWebhooksSlackCreate({
10145
- name,
10146
- org,
10147
- requestBody
10148
- }) {
10149
- return request(OpenAPI, {
10150
- method: 'POST',
10151
- url: '/api/ai-bot/v1/bots/webhooks/{org}/slack/{name}/',
10152
- path: {
10153
- 'name': name,
10154
- 'org': org
10155
- },
10156
- body: requestBody,
10157
- mediaType: 'application/json'
10158
- });
10159
- }
10160
- /**
10161
- * @returns TeamsWebhook
10162
- * @throws ApiError
10163
- */
10164
- static aiBotV1BotsWebhooksTeamsCreate({
10165
- name,
10166
- org,
10167
- requestBody
10168
- }) {
10169
- return request(OpenAPI, {
10170
- method: 'POST',
10171
- url: '/api/ai-bot/v1/bots/webhooks/{org}/teams/{name}/',
10172
- path: {
10173
- 'name': name,
10174
- 'org': org
10175
- },
10176
- body: requestBody,
10177
- mediaType: 'application/json'
10178
- });
10179
- }
10180
- /**
10181
- * Webhook endpoint to receive and process discord messages.
10182
- * @returns WebexWebhook
10183
- * @throws ApiError
10184
- */
10185
- static aiBotV1BotsWebhooksWebexCreate({
10186
- name,
10187
- org,
10188
- requestBody
10189
- }) {
10190
- return request(OpenAPI, {
10191
- method: 'POST',
10192
- url: '/api/ai-bot/v1/bots/webhooks/{org}/webex/{name}/',
10193
- path: {
10194
- 'name': name,
10195
- 'org': org
10196
- },
10197
- body: requestBody,
10198
- mediaType: 'application/json'
10199
- });
10200
- }
10201
- /**
10202
- * Respond to whatsapp's webhook challenge.
10203
- * Parameters Required include the tenant key (org) and the name of the bot: (name)
10204
- * @returns WhatAppWebHook
10205
- * @throws ApiError
10206
- */
10207
- static aiBotV1BotsWebhooksWhatsappRetrieve({
10208
- name,
10209
- org
10210
- }) {
10211
- return request(OpenAPI, {
10212
- method: 'GET',
10213
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
10214
- path: {
10215
- 'name': name,
10216
- 'org': org
10217
- }
10218
- });
10219
- }
10220
- /**
10221
- * Accept and process webhook events from whatsapp.
10222
- * @returns WhatAppWebHook
10223
- * @throws ApiError
10224
- */
10225
- static aiBotV1BotsWebhooksWhatsappCreate({
10226
- name,
10227
- org,
10228
- requestBody
10229
- }) {
10230
- return request(OpenAPI, {
10231
- method: 'POST',
10232
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
10233
- path: {
10234
- 'name': name,
10235
- 'org': org
10236
- },
10237
- body: requestBody,
10238
- mediaType: 'application/json'
10239
- });
10240
- }
10241
- }
10242
-
10243
- class AiFinetuningService {
10244
- /**
10245
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10246
- * @returns PaginatedDataSetList
10247
- * @throws ApiError
10248
- */
10249
- static aiFinetuningV1OrgUserDatasetsList({
10250
- org,
10251
- username,
10252
- dateCreated,
10253
- numDataPoints,
10254
- ordering,
10255
- page,
10256
- pageSize,
10257
- retryAttempts,
10258
- search,
10259
- status
10260
- }) {
10261
- return request(OpenAPI, {
10262
- method: 'GET',
10263
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
10264
- path: {
10265
- 'org': org,
10266
- 'username': username
10267
- },
10268
- query: {
10269
- 'date_created': dateCreated,
10270
- 'num_data_points': numDataPoints,
10271
- 'ordering': ordering,
10272
- 'page': page,
10273
- 'page_size': pageSize,
10274
- 'retry_attempts': retryAttempts,
10275
- 'search': search,
10276
- 'status': status
10277
- }
10278
- });
10279
- }
10280
- /**
10281
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10282
- * @returns DataSetCreate
10283
- * @throws ApiError
10284
- */
10285
- static aiFinetuningV1OrgUserDatasetsCreate({
10286
- org,
10287
- username,
10288
- requestBody
10289
- }) {
10290
- return request(OpenAPI, {
10291
- method: 'POST',
10292
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
10293
- path: {
10294
- 'org': org,
10295
- 'username': username
10296
- },
10297
- body: requestBody,
10298
- mediaType: 'application/json'
10299
- });
10300
- }
10301
- /**
10302
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10303
- * @returns DataSet
10304
- * @throws ApiError
10305
- */
10306
- static aiFinetuningV1OrgUserDatasetsRetrieve({
10307
- id,
10308
- org,
10309
- username
10310
- }) {
10311
- return request(OpenAPI, {
10312
- method: 'GET',
10313
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10314
- path: {
10315
- 'id': id,
10316
- 'org': org,
10317
- 'username': username
10318
- }
10319
- });
10320
- }
10321
- /**
10322
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10323
- * @returns DataSet
10324
- * @throws ApiError
10325
- */
10326
- static aiFinetuningV1OrgUserDatasetsUpdate({
10327
- id,
10328
- org,
10329
- username,
10330
- requestBody
10331
- }) {
10332
- return request(OpenAPI, {
10333
- method: 'PUT',
10334
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10335
- path: {
10336
- 'id': id,
10337
- 'org': org,
10338
- 'username': username
10339
- },
10340
- body: requestBody,
10341
- mediaType: 'application/json'
10342
- });
10343
- }
10344
- /**
10345
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10346
- * @returns DataSet
10347
- * @throws ApiError
10348
- */
10349
- static aiFinetuningV1OrgUserDatasetsPartialUpdate({
10350
- id,
10351
- org,
10352
- username,
10353
- requestBody
10354
- }) {
10355
- return request(OpenAPI, {
10356
- method: 'PATCH',
10357
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10358
- path: {
10359
- 'id': id,
10360
- 'org': org,
10361
- 'username': username
10362
- },
10363
- body: requestBody,
10364
- mediaType: 'application/json'
10365
- });
10366
- }
10367
- /**
10368
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10369
- * @returns void
10370
- * @throws ApiError
10371
- */
10372
- static aiFinetuningV1OrgUserDatasetsDestroy({
10373
- id,
10374
- org,
10375
- username
10376
- }) {
10377
- return request(OpenAPI, {
10378
- method: 'DELETE',
10379
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
10380
- path: {
10381
- 'id': id,
10382
- 'org': org,
10383
- 'username': username
10384
- }
10385
- });
10386
- }
10387
- /**
10388
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10389
- * @returns PaginatedTrainingList
10390
- * @throws ApiError
10391
- */
10392
- static aiFinetuningV1OrgUserTrainingsList({
10393
- org,
10394
- username,
10395
- baseModelName,
10396
- dataset,
10397
- dateCreated,
10398
- fineTunedModel,
10399
- lastModified,
10400
- ordering,
10401
- page,
10402
- pageSize,
10403
- preprocessDataset,
10404
- provider,
10405
- search,
10406
- status
10407
- }) {
10408
- return request(OpenAPI, {
10409
- method: 'GET',
10410
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
10411
- path: {
10412
- 'org': org,
10413
- 'username': username
10414
- },
10415
- query: {
10416
- 'base_model_name': baseModelName,
10417
- 'dataset': dataset,
10418
- 'date_created': dateCreated,
10419
- 'fine_tuned_model': fineTunedModel,
10420
- 'last_modified': lastModified,
10421
- 'ordering': ordering,
10422
- 'page': page,
10423
- 'page_size': pageSize,
10424
- 'preprocess_dataset': preprocessDataset,
10425
- 'provider': provider,
10426
- 'search': search,
10427
- 'status': status
10428
- }
10429
- });
10430
- }
10431
- /**
10432
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10433
- * @returns TrainingCreate
10434
- * @throws ApiError
10435
- */
10436
- static aiFinetuningV1OrgUserTrainingsCreate({
10437
- org,
10438
- username,
10439
- requestBody
10440
- }) {
10441
- return request(OpenAPI, {
10442
- method: 'POST',
10443
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
10444
- path: {
10445
- 'org': org,
10446
- 'username': username
10447
- },
10448
- body: requestBody,
10449
- mediaType: 'application/json'
10450
- });
10451
- }
10452
- /**
10453
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10454
- * @returns Training
10455
- * @throws ApiError
10456
- */
10457
- static aiFinetuningV1OrgUserTrainingsRetrieve({
10458
- id,
10459
- org,
10460
- username
10461
- }) {
10462
- return request(OpenAPI, {
10463
- method: 'GET',
10464
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10465
- path: {
10466
- 'id': id,
10467
- 'org': org,
10468
- 'username': username
10469
- }
10470
- });
10471
- }
10472
- /**
10473
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10474
- * @returns TrainingCreate
10475
- * @throws ApiError
10476
- */
10477
- static aiFinetuningV1OrgUserTrainingsUpdate({
10478
- id,
10479
- org,
10480
- username,
10481
- requestBody
10482
- }) {
10483
- return request(OpenAPI, {
10484
- method: 'PUT',
10485
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10486
- path: {
10487
- 'id': id,
10488
- 'org': org,
10489
- 'username': username
10490
- },
10491
- body: requestBody,
10492
- mediaType: 'application/json'
10493
- });
10494
- }
10495
- /**
10496
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10497
- * @returns TrainingCreate
10498
- * @throws ApiError
10499
- */
10500
- static aiFinetuningV1OrgUserTrainingsPartialUpdate({
10501
- id,
10502
- org,
10503
- username,
10504
- requestBody
10505
- }) {
10506
- return request(OpenAPI, {
10507
- method: 'PATCH',
10508
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10509
- path: {
10510
- 'id': id,
10511
- 'org': org,
10512
- 'username': username
10513
- },
10514
- body: requestBody,
10515
- mediaType: 'application/json'
10516
- });
10517
- }
10518
- /**
10519
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10520
- * @returns void
10521
- * @throws ApiError
10522
- */
10523
- static aiFinetuningV1OrgUserTrainingsDestroy({
10524
- id,
10525
- org,
10526
- username
10527
- }) {
10528
- return request(OpenAPI, {
10529
- method: 'DELETE',
10530
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
10531
- path: {
10532
- 'id': id,
10533
- 'org': org,
10534
- 'username': username
10535
- }
10536
- });
10537
- }
10538
- /**
10539
- * Retrieves a paginated list of completed fine-tuned models, excluding those without a fine-tuned model.
10540
- * Filtering and pagination is allowed.
10541
- *
10542
- * NB: This is only a helper endpoint. The same functionality can be achieved with the appropriate filters using the
10543
- * training list endpoint.
10544
- * Returns:
10545
- * Response: A paginated response containing the serialized fine-tuned models.
10546
- * @returns Training
10547
- * @throws ApiError
10548
- */
10549
- static aiFinetuningV1OrgUserTrainingsFinetunedModelsRetrieve({
10550
- org,
10551
- username
10552
- }) {
10553
- return request(OpenAPI, {
10554
- method: 'GET',
10555
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/finetuned-models/',
10556
- path: {
10557
- 'org': org,
10558
- 'username': username
10559
- }
10560
- });
10561
- }
10562
- }
10563
-
10564
- class AiIndexService {
10565
- /**
10566
- * Retrieve details of a specific document embedding.
10567
- *
10568
- * This endpoint returns detailed information about a specific
10569
- * document embedding identified by its ID.
10570
- *
10571
- * Args:
10572
- * request: The HTTP request.
10573
- * org: Organization key identifier.
10574
- * document_id: The ID of the document embedding to retrieve.
10575
- *
10576
- * Returns:
10577
- * Response: Detailed information about the document embedding.
10578
- *
10579
- * Raises:
10580
- * NotFound: If the specified document embedding does not exist.
10581
- * @returns RetrieverDocumentEmbedding
10582
- * @throws ApiError
10583
- */
10584
- static aiIndexOrgsUsersDocumentsRetrieve({
10585
- documentId,
10586
- org,
10587
- userId
10588
- }) {
10589
- return request(OpenAPI, {
10590
- method: 'GET',
10591
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10592
- path: {
10593
- 'document_id': documentId,
10594
- 'org': org,
10595
- 'user_id': userId
10596
- },
10597
- errors: {
10598
- 404: `Document not found`
10599
- }
10600
- });
10601
- }
10602
- /**
10603
- * Update a specific document embedding.
10604
- *
10605
- * This endpoint allows updating various properties of a document embedding,
10606
- * including its name, type, pathway, and training status.
10607
- *
10608
- * Args:
10609
- * request: The HTTP request containing the updated document data.
10610
- * org: Organization key identifier.
10611
- * document_id: The ID of the document embedding to update.
10612
- *
10613
- * Returns:
10614
- * Response: The updated document embedding information.
10615
- *
10616
- * Raises:
10617
- * BadRequest: If the provided data is invalid.
10618
- * NotFound: If the specified document embedding does not exist.
10619
- * @returns RetrieverDocumentEmbedding
10620
- * @throws ApiError
10621
- */
10622
- static aiIndexOrgsUsersDocumentsUpdate({
10623
- documentId,
10624
- org,
10625
- userId,
10626
- formData
10627
- }) {
10628
- return request(OpenAPI, {
10629
- method: 'PUT',
10630
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10631
- path: {
10632
- 'document_id': documentId,
10633
- 'org': org,
10634
- 'user_id': userId
10635
- },
10636
- formData: formData,
10637
- mediaType: 'multipart/form-data',
10638
- errors: {
10639
- 400: `Invalid request data`,
10640
- 404: `Document not found`
10641
- }
10642
- });
10643
- }
10644
- /**
10645
- * Delete a specific document embedding.
10646
- *
10647
- * This endpoint removes a document embedding from the system,
10648
- * including untraining it from any associated pathways.
10649
- *
10650
- * Args:
10651
- * request: The HTTP request.
10652
- * org: Organization key identifier.
10653
- * document_id: The ID of the document embedding to delete.
10654
- *
10655
- * Returns:
10656
- * Response: An empty response with a 204 status code if successful.
10657
- *
10658
- * Raises:
10659
- * NotFound: If the specified document embedding does not exist.
10660
- * @returns void
10661
- * @throws ApiError
10662
- */
10663
- static aiIndexOrgsUsersDocumentsDestroy({
10664
- documentId,
10665
- org,
10666
- userId
10667
- }) {
10668
- return request(OpenAPI, {
10669
- method: 'DELETE',
10670
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
10671
- path: {
10672
- 'document_id': documentId,
10673
- 'org': org,
10674
- 'user_id': userId
10675
- },
10676
- errors: {
10677
- 404: `Document not found`
10678
- }
10679
- });
10680
- }
10681
- /**
10682
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10683
- * @returns DocumentSettingsResponse
10684
- * @throws ApiError
10685
- */
10686
- static aiIndexOrgsUsersDocumentsSettingsRetrieve({
10687
- documentId,
10688
- org,
10689
- userId
10690
- }) {
10691
- return request(OpenAPI, {
10692
- method: 'GET',
10693
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
10694
- path: {
10695
- 'document_id': documentId,
10696
- 'org': org,
10697
- 'user_id': userId
10698
- }
10699
- });
10700
- }
10701
- /**
10702
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
10703
- * @returns DocumentSettingsResponse
10704
- * @throws ApiError
10705
- */
10706
- static aiIndexOrgsUsersDocumentsSettingsCreate({
10707
- documentId,
10708
- org,
10709
- userId,
10710
- requestBody
10711
- }) {
10712
- return request(OpenAPI, {
10713
- method: 'POST',
10714
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
10715
- path: {
10716
- 'document_id': documentId,
10717
- 'org': org,
10718
- 'user_id': userId
10719
- },
10720
- body: requestBody,
10721
- mediaType: 'application/json'
10722
- });
10723
- }
10724
- /**
10725
- * Description:
10726
- * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
10727
- *
10728
- * Methods:
10729
- * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
10730
- *
10731
- * Parameters:
10732
- * - search (str): Search query to filter document names or URLs.
10733
- * - offset (int): Offset number for pagination.
10734
- * - limit (int): Limit number for pagination.
10735
- *
10736
- * Returns:
10737
- * - GET: A paginated list of document embeddings with their details.
10738
- * {
10739
- * "count": 10,
10740
- * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
10741
- * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
10742
- * "results": [
10743
- * {
10744
- * "document_name": "Document2",
10745
- * "platform_key": "example_platform",
10746
- * "pathway": "example_pathway"
10747
- * }
10748
- * ]
10749
- * }
10750
- *
10751
- * Error Responses:
10752
- * - 400 Bad Request: Invalid query parameters.
10753
- * - 404 Not Found: No document embeddings found for the specified criteria.
10754
- * @returns PaginatedRetrieverDocumentEmbeddingList
10755
- * @throws ApiError
10756
- */
10757
- static aiIndexOrgsUsersDocumentsPathwaysList({
10758
- org,
10759
- pathway,
10760
- userId,
10761
- limit,
10762
- offset,
10763
- search
10764
- }) {
10765
- return request(OpenAPI, {
10766
- method: 'GET',
10767
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
10768
- path: {
10769
- 'org': org,
10770
- 'pathway': pathway,
10771
- 'user_id': userId
10772
- },
10773
- query: {
10774
- 'limit': limit,
10775
- 'offset': offset,
10776
- 'search': search
10777
- }
10778
- });
10779
- }
10780
- /**
10781
- * Retrieve resource documents similar to the given query.
10782
- *
10783
- * This endpoint performs a semantic search to find documents that are
10784
- * relevant to the provided query within the specified pathway.
10785
- *
10786
- * Args:
10787
- * request: The HTTP request containing the search query.
10788
- * org: Organization key identifier.
10789
- *
10790
- * Returns:
10791
- * Response: A list of documents relevant to the search query.
10792
- *
10793
- * Raises:
10794
- * ValidationError: If the request data is invalid.
10795
- * @returns RetrieverResponseSearch
10796
- * @throws ApiError
10797
- */
10798
- static aiIndexOrgsUsersDocumentsSearchCreate({
10799
- org,
10800
- userId,
10801
- requestBody
10802
- }) {
10803
- return request(OpenAPI, {
10804
- method: 'POST',
10805
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
10806
- path: {
10807
- 'org': org,
10808
- 'user_id': userId
10809
- },
10810
- body: requestBody,
10811
- mediaType: 'application/json',
10812
- errors: {
10813
- 400: `Invalid request data`
10814
- }
10815
- });
10816
- }
10817
- /**
10818
- * Retrieve document sources related to a given query.
10819
- *
10820
- * This endpoint performs a semantic search to find document sources
10821
- * that are relevant to the provided query within the specified pathway,
10822
- * and returns them along with confidence levels.
10823
- *
10824
- * Args:
10825
- * request: The HTTP request containing the search query.
10826
- * org: Organization key identifier.
10827
- *
10828
- * Returns:
10829
- * Response: A list of document sources with confidence levels.
10830
- *
10831
- * Raises:
10832
- * ValidationError: If the request data is invalid.
10833
- * @returns RetrieverRequestSearchDocument
10834
- * @throws ApiError
10835
- */
10836
- static aiIndexOrgsUsersDocumentsSourcesCreate({
10837
- org,
10838
- userId,
10839
- requestBody
10840
- }) {
10841
- return request(OpenAPI, {
10842
- method: 'POST',
10843
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
10844
- path: {
10845
- 'org': org,
10846
- 'user_id': userId
10847
- },
10848
- body: requestBody,
10849
- mediaType: 'application/json',
10850
- errors: {
10851
- 400: `Invalid request data`
10852
- }
10853
- });
10854
- }
10855
- /**
10856
- * Check the status of a document training task.
10857
- *
10858
- * This endpoint retrieves the current status of an asynchronous
10859
- * document training task that was previously initiated.
10860
- *
10861
- * Args:
10862
- * request: The HTTP request.
10863
- * org: Organization key identifier.
10864
- * task_id: The ID of the training task to check.
10865
- *
10866
- * Returns:
10867
- * Response: The current status of the document training task,
10868
- * which can be "pending", "completed", or "failed".
10869
- * @returns CheckDocumentTrainingStatus
10870
- * @throws ApiError
10871
- */
10872
- static aiIndexOrgsUsersDocumentsTasksRetrieve({
10873
- org,
10874
- taskId,
10875
- userId
10876
- }) {
10877
- return request(OpenAPI, {
10878
- method: 'GET',
10879
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
10880
- path: {
10881
- 'org': org,
10882
- 'task_id': taskId,
10883
- 'user_id': userId
10884
- }
10885
- });
10886
- }
10887
- /**
10888
- * Train a document through a worker process.
10889
- *
10890
- * This endpoint queues larger documents for training through a worker
10891
- * process, which is more suitable for handling documents that would
10892
- * take too long to process directly.
10893
- *
10894
- * Args:
10895
- * request: The HTTP request containing the document information.
10896
- * org: Organization key identifier.
10897
- *
10898
- * Returns:
10899
- * Response: A confirmation that the document was queued for training,
10900
- * including a task ID for tracking the progress.
10901
- *
10902
- * Raises:
10903
- * ValidationError: If the request data is invalid.
10904
- * BadRequest: If there was an error processing the document.
10905
- * @returns TrainDocumentViewResponse
10906
- * @throws ApiError
10907
- */
10908
- static aiIndexOrgsUsersDocumentsTrainCreate({
10909
- org,
10910
- userId,
10911
- formData
10912
- }) {
10913
- return request(OpenAPI, {
10914
- method: 'POST',
10915
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
10916
- path: {
10917
- 'org': org,
10918
- 'user_id': userId
10919
- },
10920
- formData: formData,
10921
- mediaType: 'multipart/form-data',
10922
- errors: {
10923
- 400: `Invalid request data`
10924
- }
10925
- });
10926
- }
10927
- /**
10928
- * Train a document directly without using a worker.
10929
- *
10930
- * This endpoint is designed for training smaller documents directly
10931
- * without queuing them through a worker process. For larger documents,
10932
- * use the TrainDocumentView endpoint instead.
10933
- *
10934
- * Args:
10935
- * request: The HTTP request containing the document information.
10936
- * org: Organization key identifier.
10937
- *
10938
- * Returns:
10939
- * Response: A confirmation that the document was trained successfully.
10940
- *
10941
- * Raises:
10942
- * ValidationError: If the request data is invalid.
10943
- * BadRequest: If the document training failed.
10944
- * @returns RetreiverTrainViewResponse
10945
- * @throws ApiError
10946
- */
10947
- static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
10948
- org,
10949
- userId,
10950
- formData
10951
- }) {
10952
- return request(OpenAPI, {
10953
- method: 'POST',
10954
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
9683
+ method: 'POST',
9684
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
10955
9685
  path: {
10956
9686
  'org': org,
10957
9687
  'user_id': userId
@@ -18506,6 +17236,54 @@ class AiMentorService {
18506
17236
  }
18507
17237
  });
18508
17238
  }
17239
+ /**
17240
+ * Mixin that includes the StudentTokenAuthentication and IsAdminUserOrStudent
17241
+ * @returns SessionMemoryAttachment
17242
+ * @throws ApiError
17243
+ */
17244
+ static aiMentorOrgsUsersSessionsMemoriesSetAttachedRetrieve({
17245
+ memoryUniqueId,
17246
+ org,
17247
+ sessionId,
17248
+ userId
17249
+ }) {
17250
+ return request(OpenAPI, {
17251
+ method: 'GET',
17252
+ url: '/api/ai-mentor/orgs/{org}/users/{user_id}/sessions/{session_id}/memories/{memory_unique_id}/set-attached/',
17253
+ path: {
17254
+ 'memory_unique_id': memoryUniqueId,
17255
+ 'org': org,
17256
+ 'session_id': sessionId,
17257
+ 'user_id': userId
17258
+ }
17259
+ });
17260
+ }
17261
+ /**
17262
+ * Create session memory attachment
17263
+ * Create session memory attachment
17264
+ * @returns SessionMemoryAttachment
17265
+ * @throws ApiError
17266
+ */
17267
+ static aiMentorOrgsUsersSessionsMemoriesSetAttachedCreate({
17268
+ memoryUniqueId,
17269
+ org,
17270
+ sessionId,
17271
+ userId,
17272
+ requestBody
17273
+ }) {
17274
+ return request(OpenAPI, {
17275
+ method: 'POST',
17276
+ url: '/api/ai-mentor/orgs/{org}/users/{user_id}/sessions/{session_id}/memories/{memory_unique_id}/set-attached/',
17277
+ path: {
17278
+ 'memory_unique_id': memoryUniqueId,
17279
+ 'org': org,
17280
+ 'session_id': sessionId,
17281
+ 'user_id': userId
17282
+ },
17283
+ body: requestBody,
17284
+ mediaType: 'application/json'
17285
+ });
17286
+ }
18509
17287
  /**
18510
17288
  * Retrieve memory data for a specific session.
18511
17289
  *
@@ -35775,8 +34553,6 @@ class SkillsService {
35775
34553
 
35776
34554
  exports.AiAccountService = AiAccountService;
35777
34555
  exports.AiAnalyticsService = AiAnalyticsService;
35778
- exports.AiBotService = AiBotService;
35779
- exports.AiFinetuningService = AiFinetuningService;
35780
34556
  exports.AiIndexService = AiIndexService;
35781
34557
  exports.AiMarketingService = AiMarketingService;
35782
34558
  exports.AiMediaService = AiMediaService;