@iblai/iblai-api 3.52.0-ai-plus → 3.53.0-ai

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/index.cjs.js +375 -1764
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +376 -1763
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +375 -1764
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +2 -40
  8. package/dist/types/models/PaginatedRetrieverDocumentEmbeddingList.d.ts +7 -0
  9. package/dist/types/models/{Provider637Enum.d.ts → ProviderEnum.d.ts} +1 -1
  10. package/dist/types/models/Voice.d.ts +2 -2
  11. package/dist/types/services/AiAnalyticsService.d.ts +0 -12
  12. package/dist/types/services/AiIndexService.d.ts +3 -2
  13. package/dist/types/services/AiMentorService.d.ts +3 -2
  14. package/package.json +1 -1
  15. package/src/core/OpenAPI.ts +1 -1
  16. package/src/index.ts +2 -40
  17. package/src/models/{PaginatedDataSetList.ts → PaginatedRetrieverDocumentEmbeddingList.ts} +3 -3
  18. package/src/models/{Provider637Enum.ts → ProviderEnum.ts} +1 -1
  19. package/src/models/Voice.ts +2 -2
  20. package/src/services/AiAnalyticsService.ts +0 -12
  21. package/src/services/AiIndexService.ts +3 -2
  22. package/src/services/AiMentorService.ts +6 -1
  23. package/dist/types/models/Bot.d.ts +0 -15
  24. package/dist/types/models/BotCommand.d.ts +0 -6
  25. package/dist/types/models/BotCreate.d.ts +0 -12
  26. package/dist/types/models/DataSet.d.ts +0 -21
  27. package/dist/types/models/DataSetCreate.d.ts +0 -12
  28. package/dist/types/models/DataSetStatusEnum.d.ts +0 -12
  29. package/dist/types/models/DiscordConfig.d.ts +0 -7
  30. package/dist/types/models/DiscordUserConfig.d.ts +0 -10
  31. package/dist/types/models/DiscordWebhook.d.ts +0 -6
  32. package/dist/types/models/PaginatedDataSetList.d.ts +0 -7
  33. package/dist/types/models/PaginatedTrainingList.d.ts +0 -7
  34. package/dist/types/models/PatchedBotCommand.d.ts +0 -6
  35. package/dist/types/models/PatchedBotCreate.d.ts +0 -12
  36. package/dist/types/models/PatchedDataSet.d.ts +0 -21
  37. package/dist/types/models/PatchedDiscordConfig.d.ts +0 -7
  38. package/dist/types/models/PatchedDiscordUserConfig.d.ts +0 -10
  39. package/dist/types/models/PatchedSlackConfig.d.ts +0 -8
  40. package/dist/types/models/PatchedSlackUserConfig.d.ts +0 -17
  41. package/dist/types/models/PatchedTeamsConfig.d.ts +0 -7
  42. package/dist/types/models/PatchedTrainingCreate.d.ts +0 -31
  43. package/dist/types/models/PatchedWebexConfig.d.ts +0 -10
  44. package/dist/types/models/PatchedWhatsappConfig.d.ts +0 -11
  45. package/dist/types/models/PatchedWhatsappUserConfig.d.ts +0 -10
  46. package/dist/types/models/Provider05cEnum.d.ts +0 -14
  47. package/dist/types/models/Provider63aEnum.d.ts +0 -6
  48. package/dist/types/models/SlackConfig.d.ts +0 -8
  49. package/dist/types/models/SlackUserConfig.d.ts +0 -17
  50. package/dist/types/models/SlackWebhook.d.ts +0 -6
  51. package/dist/types/models/TeamsConfig.d.ts +0 -7
  52. package/dist/types/models/TeamsWebhook.d.ts +0 -17
  53. package/dist/types/models/Training.d.ts +0 -41
  54. package/dist/types/models/TrainingCreate.d.ts +0 -31
  55. package/dist/types/models/WebexConfig.d.ts +0 -10
  56. package/dist/types/models/WebexWebhook.d.ts +0 -4
  57. package/dist/types/models/WhatAppWebHook.d.ts +0 -3
  58. package/dist/types/models/WhatsappConfig.d.ts +0 -11
  59. package/dist/types/models/WhatsappUserConfig.d.ts +0 -10
  60. package/dist/types/services/AiBotService.d.ts +0 -642
  61. package/dist/types/services/AiFinetuningService.d.ts +0 -232
  62. package/src/models/Bot.ts +0 -20
  63. package/src/models/BotCommand.ts +0 -11
  64. package/src/models/BotCreate.ts +0 -17
  65. package/src/models/DataSet.ts +0 -26
  66. package/src/models/DataSetCreate.ts +0 -17
  67. package/src/models/DataSetStatusEnum.ts +0 -16
  68. package/src/models/DiscordConfig.ts +0 -12
  69. package/src/models/DiscordUserConfig.ts +0 -15
  70. package/src/models/DiscordWebhook.ts +0 -11
  71. package/src/models/PaginatedTrainingList.ts +0 -12
  72. package/src/models/PatchedBotCommand.ts +0 -11
  73. package/src/models/PatchedBotCreate.ts +0 -17
  74. package/src/models/PatchedDataSet.ts +0 -26
  75. package/src/models/PatchedDiscordConfig.ts +0 -12
  76. package/src/models/PatchedDiscordUserConfig.ts +0 -15
  77. package/src/models/PatchedSlackConfig.ts +0 -13
  78. package/src/models/PatchedSlackUserConfig.ts +0 -22
  79. package/src/models/PatchedTeamsConfig.ts +0 -12
  80. package/src/models/PatchedTrainingCreate.ts +0 -36
  81. package/src/models/PatchedWebexConfig.ts +0 -15
  82. package/src/models/PatchedWhatsappConfig.ts +0 -16
  83. package/src/models/PatchedWhatsappUserConfig.ts +0 -15
  84. package/src/models/Provider05cEnum.ts +0 -18
  85. package/src/models/Provider63aEnum.ts +0 -10
  86. package/src/models/SlackConfig.ts +0 -13
  87. package/src/models/SlackUserConfig.ts +0 -22
  88. package/src/models/SlackWebhook.ts +0 -11
  89. package/src/models/TeamsConfig.ts +0 -12
  90. package/src/models/TeamsWebhook.ts +0 -22
  91. package/src/models/Training.ts +0 -46
  92. package/src/models/TrainingCreate.ts +0 -36
  93. package/src/models/WebexConfig.ts +0 -15
  94. package/src/models/WebexWebhook.ts +0 -9
  95. package/src/models/WhatAppWebHook.ts +0 -8
  96. package/src/models/WhatsappConfig.ts +0 -16
  97. package/src/models/WhatsappUserConfig.ts +0 -15
  98. package/src/services/AiBotService.ts +0 -1330
  99. 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: '3.52.0-ai-plus',
113
+ VERSION: '3.53.0-ai',
114
114
  WITH_CREDENTIALS: false,
115
115
  CREDENTIALS: 'include',
116
116
  TOKEN: undefined,
@@ -245,24 +245,6 @@ exports.CourseCreationTaskStatusEnum = void 0;
245
245
  CourseCreationTaskStatusEnum["IN_PROGRESS"] = "In Progress";
246
246
  })(exports.CourseCreationTaskStatusEnum || (exports.CourseCreationTaskStatusEnum = {}));
247
247
 
248
- /* generated using openapi-typescript-codegen -- do not edit */
249
- /* istanbul ignore file */
250
- /* tslint:disable */
251
- /* eslint-disable */
252
- /**
253
- * * `pending` - Pending
254
- * * `processing` - Processing
255
- * * `completed` - Completed
256
- * * `failed` - Failed
257
- */
258
- exports.DataSetStatusEnum = void 0;
259
- (function (DataSetStatusEnum) {
260
- DataSetStatusEnum["PENDING"] = "pending";
261
- DataSetStatusEnum["PROCESSING"] = "processing";
262
- DataSetStatusEnum["COMPLETED"] = "completed";
263
- DataSetStatusEnum["FAILED"] = "failed";
264
- })(exports.DataSetStatusEnum || (exports.DataSetStatusEnum = {}));
265
-
266
248
  /* generated using openapi-typescript-codegen -- do not edit */
267
249
  /* istanbul ignore file */
268
250
  /* tslint:disable */
@@ -543,26 +525,6 @@ exports.PromptVisibilityEnum = void 0;
543
525
  PromptVisibilityEnum["VIEWABLE_BY_ANYONE"] = "viewable_by_anyone";
544
526
  })(exports.PromptVisibilityEnum || (exports.PromptVisibilityEnum = {}));
545
527
 
546
- /* generated using openapi-typescript-codegen -- do not edit */
547
- /* istanbul ignore file */
548
- /* tslint:disable */
549
- /* eslint-disable */
550
- /**
551
- * * `webex` - Webex
552
- * * `slack` - Slack
553
- * * `whatsapp` - Whatsapp
554
- * * `discord` - Discord
555
- * * `teams` - Teams
556
- */
557
- exports.Provider05cEnum = void 0;
558
- (function (Provider05cEnum) {
559
- Provider05cEnum["WEBEX"] = "webex";
560
- Provider05cEnum["SLACK"] = "slack";
561
- Provider05cEnum["WHATSAPP"] = "whatsapp";
562
- Provider05cEnum["DISCORD"] = "discord";
563
- Provider05cEnum["TEAMS"] = "teams";
564
- })(exports.Provider05cEnum || (exports.Provider05cEnum = {}));
565
-
566
528
  /* generated using openapi-typescript-codegen -- do not edit */
567
529
  /* istanbul ignore file */
568
530
  /* tslint:disable */
@@ -572,24 +534,12 @@ exports.Provider05cEnum = void 0;
572
534
  * * `google` - Google
573
535
  * * `elevenlabs` - Elevenlabs
574
536
  */
575
- exports.Provider637Enum = void 0;
576
- (function (Provider637Enum) {
577
- Provider637Enum["OPENAI"] = "openai";
578
- Provider637Enum["GOOGLE"] = "google";
579
- Provider637Enum["ELEVENLABS"] = "elevenlabs";
580
- })(exports.Provider637Enum || (exports.Provider637Enum = {}));
581
-
582
- /* generated using openapi-typescript-codegen -- do not edit */
583
- /* istanbul ignore file */
584
- /* tslint:disable */
585
- /* eslint-disable */
586
- /**
587
- * * `openai` - Openai
588
- */
589
- exports.Provider63aEnum = void 0;
590
- (function (Provider63aEnum) {
591
- Provider63aEnum["OPENAI"] = "openai";
592
- })(exports.Provider63aEnum || (exports.Provider63aEnum = {}));
537
+ exports.ProviderEnum = void 0;
538
+ (function (ProviderEnum) {
539
+ ProviderEnum["OPENAI"] = "openai";
540
+ ProviderEnum["GOOGLE"] = "google";
541
+ ProviderEnum["ELEVENLABS"] = "elevenlabs";
542
+ })(exports.ProviderEnum || (exports.ProviderEnum = {}));
593
543
 
594
544
  /* generated using openapi-typescript-codegen -- do not edit */
595
545
  /* istanbul ignore file */
@@ -5785,1845 +5735,504 @@ class AiAnalyticsService {
5785
5735
  }
5786
5736
  }
5787
5737
 
5788
- class AiBotService {
5738
+ class AiIndexService {
5789
5739
  /**
5790
- * Create modify and update bot information for a specific tenant.
5791
- * @returns Bot
5740
+ * Retrieve details of a specific document embedding.
5741
+ *
5742
+ * This endpoint returns detailed information about a specific
5743
+ * document embedding identified by its ID.
5744
+ *
5745
+ * Args:
5746
+ * request: The HTTP request.
5747
+ * org: Organization key identifier.
5748
+ * document_id: The ID of the document embedding to retrieve.
5749
+ *
5750
+ * Returns:
5751
+ * Response: Detailed information about the document embedding.
5752
+ *
5753
+ * Raises:
5754
+ * NotFound: If the specified document embedding does not exist.
5755
+ * @returns RetrieverDocumentEmbedding
5792
5756
  * @throws ApiError
5793
5757
  */
5794
- static aiBotV1BotsBotList({
5795
- org
5758
+ static aiIndexOrgsUsersDocumentsRetrieve({
5759
+ documentId,
5760
+ org,
5761
+ userId
5796
5762
  }) {
5797
5763
  return request(OpenAPI, {
5798
5764
  method: 'GET',
5799
- url: '/api/ai-bot/v1/bots/{org}/bot/',
5765
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
5800
5766
  path: {
5801
- 'org': org
5767
+ 'document_id': documentId,
5768
+ 'org': org,
5769
+ 'user_id': userId
5770
+ },
5771
+ errors: {
5772
+ 404: `Document not found`
5802
5773
  }
5803
5774
  });
5804
5775
  }
5805
5776
  /**
5806
- * Create modify and update bot information for a specific tenant.
5807
- * @returns BotCreate
5777
+ * Update a specific document embedding.
5778
+ *
5779
+ * This endpoint allows updating various properties of a document embedding,
5780
+ * including its name, type, pathway, and training status.
5781
+ *
5782
+ * Args:
5783
+ * request: The HTTP request containing the updated document data.
5784
+ * org: Organization key identifier.
5785
+ * document_id: The ID of the document embedding to update.
5786
+ *
5787
+ * Returns:
5788
+ * Response: The updated document embedding information.
5789
+ *
5790
+ * Raises:
5791
+ * BadRequest: If the provided data is invalid.
5792
+ * NotFound: If the specified document embedding does not exist.
5793
+ * @returns RetrieverDocumentEmbedding
5808
5794
  * @throws ApiError
5809
5795
  */
5810
- static aiBotV1BotsBotCreate({
5796
+ static aiIndexOrgsUsersDocumentsUpdate({
5797
+ documentId,
5811
5798
  org,
5812
- requestBody
5799
+ userId,
5800
+ formData
5813
5801
  }) {
5814
5802
  return request(OpenAPI, {
5815
- method: 'POST',
5816
- url: '/api/ai-bot/v1/bots/{org}/bot/',
5803
+ method: 'PUT',
5804
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
5817
5805
  path: {
5818
- 'org': org
5806
+ 'document_id': documentId,
5807
+ 'org': org,
5808
+ 'user_id': userId
5819
5809
  },
5820
- body: requestBody,
5821
- mediaType: 'application/json'
5822
- });
5823
- }
5824
- /**
5825
- * Create slash commands for a specific bot
5826
- * eg. /iblai-baseline
5827
- * @returns BotCommand
5828
- * @throws ApiError
5829
- */
5830
- static aiBotV1BotsBotCommandsList({
5831
- org
5832
- }) {
5833
- return request(OpenAPI, {
5834
- method: 'GET',
5835
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
5836
- path: {
5837
- 'org': org
5810
+ formData: formData,
5811
+ mediaType: 'multipart/form-data',
5812
+ errors: {
5813
+ 400: `Invalid request data`,
5814
+ 404: `Document not found`
5838
5815
  }
5839
5816
  });
5840
5817
  }
5841
5818
  /**
5842
- * Create slash commands for a specific bot
5843
- * eg. /iblai-baseline
5844
- * @returns BotCommand
5819
+ * Delete a specific document embedding.
5820
+ *
5821
+ * This endpoint removes a document embedding from the system,
5822
+ * including untraining it from any associated pathways.
5823
+ *
5824
+ * Args:
5825
+ * request: The HTTP request.
5826
+ * org: Organization key identifier.
5827
+ * document_id: The ID of the document embedding to delete.
5828
+ *
5829
+ * Returns:
5830
+ * Response: An empty response with a 204 status code if successful.
5831
+ *
5832
+ * Raises:
5833
+ * NotFound: If the specified document embedding does not exist.
5834
+ * @returns void
5845
5835
  * @throws ApiError
5846
5836
  */
5847
- static aiBotV1BotsBotCommandsCreate({
5837
+ static aiIndexOrgsUsersDocumentsDestroy({
5838
+ documentId,
5848
5839
  org,
5849
- requestBody
5840
+ userId
5850
5841
  }) {
5851
5842
  return request(OpenAPI, {
5852
- method: 'POST',
5853
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/',
5843
+ method: 'DELETE',
5844
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
5854
5845
  path: {
5855
- 'org': org
5846
+ 'document_id': documentId,
5847
+ 'org': org,
5848
+ 'user_id': userId
5856
5849
  },
5857
- body: requestBody,
5858
- mediaType: 'application/json'
5850
+ errors: {
5851
+ 404: `Document not found`
5852
+ }
5859
5853
  });
5860
5854
  }
5861
5855
  /**
5862
- * Create slash commands for a specific bot
5863
- * eg. /iblai-baseline
5864
- * @returns BotCommand
5856
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
5857
+ * @returns DocumentSettingsResponse
5865
5858
  * @throws ApiError
5866
5859
  */
5867
- static aiBotV1BotsBotCommandsRetrieve({
5868
- id,
5869
- org
5860
+ static aiIndexOrgsUsersDocumentsSettingsRetrieve({
5861
+ documentId,
5862
+ org,
5863
+ userId
5870
5864
  }) {
5871
5865
  return request(OpenAPI, {
5872
5866
  method: 'GET',
5873
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
5867
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
5874
5868
  path: {
5875
- 'id': id,
5876
- 'org': org
5869
+ 'document_id': documentId,
5870
+ 'org': org,
5871
+ 'user_id': userId
5877
5872
  }
5878
5873
  });
5879
5874
  }
5880
5875
  /**
5881
- * Create slash commands for a specific bot
5882
- * eg. /iblai-baseline
5883
- * @returns BotCommand
5876
+ * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
5877
+ * @returns DocumentSettingsResponse
5884
5878
  * @throws ApiError
5885
5879
  */
5886
- static aiBotV1BotsBotCommandsUpdate({
5887
- id,
5880
+ static aiIndexOrgsUsersDocumentsSettingsCreate({
5881
+ documentId,
5888
5882
  org,
5883
+ userId,
5889
5884
  requestBody
5890
5885
  }) {
5891
5886
  return request(OpenAPI, {
5892
- method: 'PUT',
5893
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
5887
+ method: 'POST',
5888
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
5894
5889
  path: {
5895
- 'id': id,
5896
- 'org': org
5890
+ 'document_id': documentId,
5891
+ 'org': org,
5892
+ 'user_id': userId
5897
5893
  },
5898
5894
  body: requestBody,
5899
5895
  mediaType: 'application/json'
5900
5896
  });
5901
5897
  }
5902
5898
  /**
5903
- * Create slash commands for a specific bot
5904
- * eg. /iblai-baseline
5905
- * @returns BotCommand
5899
+ * Train a graph-based document through a worker process.
5900
+ *
5901
+ * This endpoint queues graph-based documents for training through a
5902
+ * specialized worker process that handles knowledge graph processing.
5903
+ *
5904
+ * Args:
5905
+ * request: The HTTP request containing the document information.
5906
+ * org: Organization key identifier.
5907
+ *
5908
+ * Returns:
5909
+ * Response: A confirmation that the document was queued for training,
5910
+ * including a task ID for tracking the progress.
5911
+ *
5912
+ * Raises:
5913
+ * ValidationError: If the request data is invalid.
5914
+ * BadRequest: If there was an error processing the document.
5915
+ * @returns TrainDocumentViewResponse
5906
5916
  * @throws ApiError
5907
5917
  */
5908
- static aiBotV1BotsBotCommandsPartialUpdate({
5909
- id,
5918
+ static aiIndexOrgsUsersDocumentsGraphTrainCreate({
5910
5919
  org,
5911
- requestBody
5920
+ userId,
5921
+ formData
5912
5922
  }) {
5913
5923
  return request(OpenAPI, {
5914
- method: 'PATCH',
5915
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
5924
+ method: 'POST',
5925
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/graph-train/',
5916
5926
  path: {
5917
- 'id': id,
5918
- 'org': org
5927
+ 'org': org,
5928
+ 'user_id': userId
5919
5929
  },
5920
- body: requestBody,
5921
- mediaType: 'application/json'
5922
- });
5923
- }
5924
- /**
5925
- * Create slash commands for a specific bot
5926
- * eg. /iblai-baseline
5927
- * @returns void
5928
- * @throws ApiError
5929
- */
5930
- static aiBotV1BotsBotCommandsDestroy({
5931
- id,
5932
- org
5933
- }) {
5934
- return request(OpenAPI, {
5935
- method: 'DELETE',
5936
- url: '/api/ai-bot/v1/bots/{org}/bot-commands/{id}/',
5937
- path: {
5938
- 'id': id,
5939
- 'org': org
5930
+ formData: formData,
5931
+ mediaType: 'multipart/form-data',
5932
+ errors: {
5933
+ 400: `Invalid request data or document processing error`
5940
5934
  }
5941
5935
  });
5942
5936
  }
5943
5937
  /**
5944
- * Create modify and update bot information for a specific tenant.
5945
- * @returns Bot
5946
- * @throws ApiError
5947
- */
5948
- static aiBotV1BotsBotRetrieve({
5949
- id,
5950
- org
5938
+ * Description:
5939
+ * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
5940
+ *
5941
+ * Methods:
5942
+ * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
5943
+ *
5944
+ * Parameters:
5945
+ * - search (str): Search query to filter document names or URLs.
5946
+ * - offset (int): Offset number for pagination.
5947
+ * - limit (int): Limit number for pagination.
5948
+ *
5949
+ * Returns:
5950
+ * - GET: A paginated list of document embeddings with their details.
5951
+ * {
5952
+ * "count": 10,
5953
+ * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
5954
+ * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
5955
+ * "results": [
5956
+ * {
5957
+ * "document_name": "Document2",
5958
+ * "platform_key": "example_platform",
5959
+ * "pathway": "example_pathway"
5960
+ * }
5961
+ * ]
5962
+ * }
5963
+ *
5964
+ * Error Responses:
5965
+ * - 400 Bad Request: Invalid query parameters.
5966
+ * - 404 Not Found: No document embeddings found for the specified criteria.
5967
+ * @returns PaginatedRetrieverDocumentEmbeddingList
5968
+ * @throws ApiError
5969
+ */
5970
+ static aiIndexOrgsUsersDocumentsPathwaysList({
5971
+ org,
5972
+ pathway,
5973
+ userId,
5974
+ limit,
5975
+ offset,
5976
+ search
5951
5977
  }) {
5952
5978
  return request(OpenAPI, {
5953
5979
  method: 'GET',
5954
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
5980
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
5955
5981
  path: {
5956
- 'id': id,
5957
- 'org': org
5982
+ 'org': org,
5983
+ 'pathway': pathway,
5984
+ 'user_id': userId
5985
+ },
5986
+ query: {
5987
+ 'limit': limit,
5988
+ 'offset': offset,
5989
+ 'search': search
5958
5990
  }
5959
5991
  });
5960
5992
  }
5961
5993
  /**
5962
- * Create modify and update bot information for a specific tenant.
5963
- * @returns BotCreate
5994
+ * Retrieve resource documents similar to the given query.
5995
+ *
5996
+ * This endpoint performs a semantic search to find documents that are
5997
+ * relevant to the provided query within the specified pathway.
5998
+ *
5999
+ * Args:
6000
+ * request: The HTTP request containing the search query.
6001
+ * org: Organization key identifier.
6002
+ *
6003
+ * Returns:
6004
+ * Response: A list of documents relevant to the search query.
6005
+ *
6006
+ * Raises:
6007
+ * ValidationError: If the request data is invalid.
6008
+ * @returns RetrieverResponseSearch
5964
6009
  * @throws ApiError
5965
6010
  */
5966
- static aiBotV1BotsBotUpdate({
5967
- id,
6011
+ static aiIndexOrgsUsersDocumentsSearchCreate({
5968
6012
  org,
6013
+ userId,
5969
6014
  requestBody
5970
6015
  }) {
5971
6016
  return request(OpenAPI, {
5972
- method: 'PUT',
5973
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
6017
+ method: 'POST',
6018
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
5974
6019
  path: {
5975
- 'id': id,
5976
- 'org': org
6020
+ 'org': org,
6021
+ 'user_id': userId
5977
6022
  },
5978
6023
  body: requestBody,
5979
- mediaType: 'application/json'
6024
+ mediaType: 'application/json',
6025
+ errors: {
6026
+ 400: `Invalid request data`
6027
+ }
5980
6028
  });
5981
6029
  }
5982
6030
  /**
5983
- * Create modify and update bot information for a specific tenant.
5984
- * @returns BotCreate
6031
+ * Retrieve document sources related to a given query.
6032
+ *
6033
+ * This endpoint performs a semantic search to find document sources
6034
+ * that are relevant to the provided query within the specified pathway,
6035
+ * and returns them along with confidence levels.
6036
+ *
6037
+ * Args:
6038
+ * request: The HTTP request containing the search query.
6039
+ * org: Organization key identifier.
6040
+ *
6041
+ * Returns:
6042
+ * Response: A list of document sources with confidence levels.
6043
+ *
6044
+ * Raises:
6045
+ * ValidationError: If the request data is invalid.
6046
+ * @returns RetrieverRequestSearchDocument
5985
6047
  * @throws ApiError
5986
6048
  */
5987
- static aiBotV1BotsBotPartialUpdate({
5988
- id,
6049
+ static aiIndexOrgsUsersDocumentsSourcesCreate({
5989
6050
  org,
6051
+ userId,
5990
6052
  requestBody
5991
6053
  }) {
5992
6054
  return request(OpenAPI, {
5993
- method: 'PATCH',
5994
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
6055
+ method: 'POST',
6056
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
5995
6057
  path: {
5996
- 'id': id,
5997
- 'org': org
6058
+ 'org': org,
6059
+ 'user_id': userId
5998
6060
  },
5999
6061
  body: requestBody,
6000
- mediaType: 'application/json'
6001
- });
6002
- }
6003
- /**
6004
- * Create modify and update bot information for a specific tenant.
6005
- * @returns void
6006
- * @throws ApiError
6007
- */
6008
- static aiBotV1BotsBotDestroy({
6009
- id,
6010
- org
6011
- }) {
6012
- return request(OpenAPI, {
6013
- method: 'DELETE',
6014
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/',
6015
- path: {
6016
- 'id': id,
6017
- 'org': org
6062
+ mediaType: 'application/json',
6063
+ errors: {
6064
+ 400: `Invalid request data`
6018
6065
  }
6019
6066
  });
6020
6067
  }
6021
6068
  /**
6022
- * Create modify and update bot information for a specific tenant.
6023
- * @returns DiscordConfig
6069
+ * Check the status of a document training task.
6070
+ *
6071
+ * This endpoint retrieves the current status of an asynchronous
6072
+ * document training task that was previously initiated.
6073
+ *
6074
+ * Args:
6075
+ * request: The HTTP request.
6076
+ * org: Organization key identifier.
6077
+ * task_id: The ID of the training task to check.
6078
+ *
6079
+ * Returns:
6080
+ * Response: The current status of the document training task,
6081
+ * which can be "pending", "completed", or "failed".
6082
+ * @returns CheckDocumentTrainingStatus
6024
6083
  * @throws ApiError
6025
6084
  */
6026
- static aiBotV1BotsBotConfigDiscordRetrieve({
6027
- id,
6028
- org
6085
+ static aiIndexOrgsUsersDocumentsTasksRetrieve({
6086
+ org,
6087
+ taskId,
6088
+ userId
6029
6089
  }) {
6030
6090
  return request(OpenAPI, {
6031
6091
  method: 'GET',
6032
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
6092
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
6033
6093
  path: {
6034
- 'id': id,
6035
- 'org': org
6094
+ 'org': org,
6095
+ 'task_id': taskId,
6096
+ 'user_id': userId
6036
6097
  }
6037
6098
  });
6038
6099
  }
6039
6100
  /**
6040
- * Create modify and update bot information for a specific tenant.
6041
- * @returns DiscordConfig
6101
+ * Train a document through a worker process.
6102
+ *
6103
+ * This endpoint queues larger documents for training through a worker
6104
+ * process, which is more suitable for handling documents that would
6105
+ * take too long to process directly.
6106
+ *
6107
+ * Args:
6108
+ * request: The HTTP request containing the document information.
6109
+ * org: Organization key identifier.
6110
+ *
6111
+ * Returns:
6112
+ * Response: A confirmation that the document was queued for training,
6113
+ * including a task ID for tracking the progress.
6114
+ *
6115
+ * Raises:
6116
+ * ValidationError: If the request data is invalid.
6117
+ * BadRequest: If there was an error processing the document.
6118
+ * @returns TrainDocumentViewResponse
6042
6119
  * @throws ApiError
6043
6120
  */
6044
- static aiBotV1BotsBotConfigDiscordPartialUpdate({
6045
- id,
6121
+ static aiIndexOrgsUsersDocumentsTrainCreate({
6046
6122
  org,
6047
- requestBody
6123
+ userId,
6124
+ formData
6048
6125
  }) {
6049
6126
  return request(OpenAPI, {
6050
- method: 'PATCH',
6051
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/discord/',
6127
+ method: 'POST',
6128
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
6052
6129
  path: {
6053
- 'id': id,
6054
- 'org': org
6130
+ 'org': org,
6131
+ 'user_id': userId
6055
6132
  },
6056
- body: requestBody,
6057
- mediaType: 'application/json'
6058
- });
6059
- }
6060
- /**
6061
- * Create modify and update bot information for a specific tenant.
6062
- * @returns SlackConfig
6063
- * @throws ApiError
6064
- */
6065
- static aiBotV1BotsBotConfigSlackRetrieve({
6066
- id,
6067
- org
6068
- }) {
6069
- return request(OpenAPI, {
6070
- method: 'GET',
6071
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/',
6072
- path: {
6073
- 'id': id,
6074
- 'org': org
6133
+ formData: formData,
6134
+ mediaType: 'multipart/form-data',
6135
+ errors: {
6136
+ 400: `Invalid request data`
6075
6137
  }
6076
6138
  });
6077
6139
  }
6078
6140
  /**
6079
- * Create modify and update bot information for a specific tenant.
6080
- * @returns SlackConfig
6141
+ * Train a document directly without using a worker.
6142
+ *
6143
+ * This endpoint is designed for training smaller documents directly
6144
+ * without queuing them through a worker process. For larger documents,
6145
+ * use the TrainDocumentView endpoint instead.
6146
+ *
6147
+ * Args:
6148
+ * request: The HTTP request containing the document information.
6149
+ * org: Organization key identifier.
6150
+ *
6151
+ * Returns:
6152
+ * Response: A confirmation that the document was trained successfully.
6153
+ *
6154
+ * Raises:
6155
+ * ValidationError: If the request data is invalid.
6156
+ * BadRequest: If the document training failed.
6157
+ * @returns RetreiverTrainViewResponse
6081
6158
  * @throws ApiError
6082
6159
  */
6083
- static aiBotV1BotsBotConfigSlackUpdateCreate({
6084
- id,
6160
+ static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
6085
6161
  org,
6086
- requestBody
6162
+ userId,
6163
+ formData
6087
6164
  }) {
6088
6165
  return request(OpenAPI, {
6089
6166
  method: 'POST',
6090
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
6167
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
6091
6168
  path: {
6092
- 'id': id,
6093
- 'org': org
6169
+ 'org': org,
6170
+ 'user_id': userId
6094
6171
  },
6095
- body: requestBody,
6096
- mediaType: 'application/json'
6172
+ formData: formData,
6173
+ mediaType: 'multipart/form-data',
6174
+ errors: {
6175
+ 400: `Invalid request data or training failed`
6176
+ }
6097
6177
  });
6098
6178
  }
6099
6179
  /**
6100
- * Create modify and update bot information for a specific tenant.
6101
- * @returns SlackConfig
6102
- * @throws ApiError
6103
- */
6104
- static aiBotV1BotsBotConfigSlackUpdateUpdate({
6105
- id,
6180
+ * Description:
6181
+ * Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
6182
+ * Process document for use in a specific chat session.
6183
+ * which will be processed and made available for the AI to reference
6184
+ * when responding to queries in that session.
6185
+ *
6186
+ * Methods:
6187
+ * - POST: Submits a document or media file for training within a specified chat session.
6188
+ *
6189
+ * Parameters:
6190
+ * - org (str):
6191
+ * - session_id (str): UUID of the chat session for which the document is being submitted.
6192
+ * - *args, **kwargs: Additional arguments.
6193
+ * - file (file): Multipart file input.
6194
+ *
6195
+ * Returns:
6196
+ * - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
6197
+ * {
6198
+ * "message": "File processed."
6199
+ * }
6200
+ *
6201
+ * Error Responses:
6202
+ * - 400 Bad Request:
6203
+ * - "File field is required" if the 'file' parameter is missing.
6204
+ * - "invalid file object" if the file object is not valid.
6205
+ * - Specific error message if an exception occurs while saving to Redis.
6206
+ * - 404 Not Found:
6207
+ * - "Session not found" if the provided session_id does not match any existing session.
6208
+ * - 413 Request Entity Too Large:
6209
+ * - "file is too large" including specific limits for document and media files if the file exceeds size limits.
6210
+ *
6211
+ * Access Control:
6212
+ * Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
6213
+ * @returns TrainChatSessionDocumentView
6214
+ * @throws ApiError
6215
+ */
6216
+ static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
6106
6217
  org,
6107
- requestBody
6218
+ sessionId,
6219
+ userId,
6220
+ formData
6108
6221
  }) {
6109
6222
  return request(OpenAPI, {
6110
- method: 'PUT',
6111
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
6223
+ method: 'POST',
6224
+ url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
6112
6225
  path: {
6113
- 'id': id,
6114
- 'org': org
6226
+ 'org': org,
6227
+ 'session_id': sessionId,
6228
+ 'user_id': userId
6115
6229
  },
6116
- body: requestBody,
6117
- mediaType: 'application/json'
6118
- });
6119
- }
6120
- /**
6121
- * Create modify and update bot information for a specific tenant.
6122
- * @returns SlackConfig
6123
- * @throws ApiError
6124
- */
6125
- static aiBotV1BotsBotConfigSlackUpdatePartialUpdate({
6126
- id,
6127
- org,
6128
- requestBody
6129
- }) {
6130
- return request(OpenAPI, {
6131
- method: 'PATCH',
6132
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/slack/update/',
6133
- path: {
6134
- 'id': id,
6135
- 'org': org
6136
- },
6137
- body: requestBody,
6138
- mediaType: 'application/json'
6139
- });
6140
- }
6141
- /**
6142
- * Create modify and update bot information for a specific tenant.
6143
- * @returns TeamsConfig
6144
- * @throws ApiError
6145
- */
6146
- static aiBotV1BotsBotConfigTeamsRetrieve({
6147
- id,
6148
- org
6149
- }) {
6150
- return request(OpenAPI, {
6151
- method: 'GET',
6152
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/',
6153
- path: {
6154
- 'id': id,
6155
- 'org': org
6156
- }
6157
- });
6158
- }
6159
- /**
6160
- * Create modify and update bot information for a specific tenant.
6161
- * @returns TeamsConfig
6162
- * @throws ApiError
6163
- */
6164
- static aiBotV1BotsBotConfigTeamsUpdateCreate({
6165
- id,
6166
- org,
6167
- requestBody
6168
- }) {
6169
- return request(OpenAPI, {
6170
- method: 'POST',
6171
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
6172
- path: {
6173
- 'id': id,
6174
- 'org': org
6175
- },
6176
- body: requestBody,
6177
- mediaType: 'application/json'
6178
- });
6179
- }
6180
- /**
6181
- * Create modify and update bot information for a specific tenant.
6182
- * @returns TeamsConfig
6183
- * @throws ApiError
6184
- */
6185
- static aiBotV1BotsBotConfigTeamsUpdateUpdate({
6186
- id,
6187
- org,
6188
- requestBody
6189
- }) {
6190
- return request(OpenAPI, {
6191
- method: 'PUT',
6192
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
6193
- path: {
6194
- 'id': id,
6195
- 'org': org
6196
- },
6197
- body: requestBody,
6198
- mediaType: 'application/json'
6199
- });
6200
- }
6201
- /**
6202
- * Create modify and update bot information for a specific tenant.
6203
- * @returns TeamsConfig
6204
- * @throws ApiError
6205
- */
6206
- static aiBotV1BotsBotConfigTeamsUpdatePartialUpdate({
6207
- id,
6208
- org,
6209
- requestBody
6210
- }) {
6211
- return request(OpenAPI, {
6212
- method: 'PATCH',
6213
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/teams/update/',
6214
- path: {
6215
- 'id': id,
6216
- 'org': org
6217
- },
6218
- body: requestBody,
6219
- mediaType: 'application/json'
6220
- });
6221
- }
6222
- /**
6223
- * Create modify and update bot information for a specific tenant.
6224
- * @returns WebexConfig
6225
- * @throws ApiError
6226
- */
6227
- static aiBotV1BotsBotConfigWebexRetrieve({
6228
- id,
6229
- org
6230
- }) {
6231
- return request(OpenAPI, {
6232
- method: 'GET',
6233
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
6234
- path: {
6235
- 'id': id,
6236
- 'org': org
6237
- }
6238
- });
6239
- }
6240
- /**
6241
- * Create modify and update bot information for a specific tenant.
6242
- * @returns WebexConfig
6243
- * @throws ApiError
6244
- */
6245
- static aiBotV1BotsBotConfigWebexPartialUpdate({
6246
- id,
6247
- org,
6248
- requestBody
6249
- }) {
6250
- return request(OpenAPI, {
6251
- method: 'PATCH',
6252
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/webex/',
6253
- path: {
6254
- 'id': id,
6255
- 'org': org
6256
- },
6257
- body: requestBody,
6258
- mediaType: 'application/json'
6259
- });
6260
- }
6261
- /**
6262
- * Create modify and update bot information for a specific tenant.
6263
- * @returns WhatsappConfig
6264
- * @throws ApiError
6265
- */
6266
- static aiBotV1BotsBotConfigWhatsappRetrieve({
6267
- id,
6268
- org
6269
- }) {
6270
- return request(OpenAPI, {
6271
- method: 'GET',
6272
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/config/whatsapp/',
6273
- path: {
6274
- 'id': id,
6275
- 'org': org
6276
- }
6277
- });
6278
- }
6279
- /**
6280
- * Create modify and update bot information for a specific tenant.
6281
- * @returns WhatsappConfig
6282
- * @throws ApiError
6283
- */
6284
- static aiBotV1BotsBotWhatsappConfigUpdate({
6285
- id,
6286
- org,
6287
- requestBody
6288
- }) {
6289
- return request(OpenAPI, {
6290
- method: 'PUT',
6291
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
6292
- path: {
6293
- 'id': id,
6294
- 'org': org
6295
- },
6296
- body: requestBody,
6297
- mediaType: 'application/json'
6298
- });
6299
- }
6300
- /**
6301
- * Create modify and update bot information for a specific tenant.
6302
- * @returns WhatsappConfig
6303
- * @throws ApiError
6304
- */
6305
- static aiBotV1BotsBotWhatsappConfigPartialUpdate({
6306
- id,
6307
- org,
6308
- requestBody
6309
- }) {
6310
- return request(OpenAPI, {
6311
- method: 'PATCH',
6312
- url: '/api/ai-bot/v1/bots/{org}/bot/{id}/whatsapp-config/',
6313
- path: {
6314
- 'id': id,
6315
- 'org': org
6316
- },
6317
- body: requestBody,
6318
- mediaType: 'application/json'
6319
- });
6320
- }
6321
- /**
6322
- * Setup discord user id linkage with discord bots
6323
- * this will be used to authenticate the user when interracting with discord bots.
6324
- * the user id can be copied from the discord app after tapping on the user profile.
6325
- * @returns DiscordUserConfig
6326
- * @throws ApiError
6327
- */
6328
- static aiBotV1BotsDiscordUserConfigList({
6329
- org
6330
- }) {
6331
- return request(OpenAPI, {
6332
- method: 'GET',
6333
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
6334
- path: {
6335
- 'org': org
6336
- }
6337
- });
6338
- }
6339
- /**
6340
- * Setup discord user id linkage with discord bots
6341
- * this will be used to authenticate the user when interracting with discord bots.
6342
- * the user id can be copied from the discord app after tapping on the user profile.
6343
- * @returns DiscordUserConfig
6344
- * @throws ApiError
6345
- */
6346
- static aiBotV1BotsDiscordUserConfigCreate({
6347
- org,
6348
- requestBody
6349
- }) {
6350
- return request(OpenAPI, {
6351
- method: 'POST',
6352
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/',
6353
- path: {
6354
- 'org': org
6355
- },
6356
- body: requestBody,
6357
- mediaType: 'application/json'
6358
- });
6359
- }
6360
- /**
6361
- * Setup discord user id linkage with discord bots
6362
- * this will be used to authenticate the user when interracting with discord bots.
6363
- * the user id can be copied from the discord app after tapping on the user profile.
6364
- * @returns DiscordUserConfig
6365
- * @throws ApiError
6366
- */
6367
- static aiBotV1BotsDiscordUserConfigRetrieve({
6368
- id,
6369
- org
6370
- }) {
6371
- return request(OpenAPI, {
6372
- method: 'GET',
6373
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
6374
- path: {
6375
- 'id': id,
6376
- 'org': org
6377
- }
6378
- });
6379
- }
6380
- /**
6381
- * Setup discord user id linkage with discord bots
6382
- * this will be used to authenticate the user when interracting with discord bots.
6383
- * the user id can be copied from the discord app after tapping on the user profile.
6384
- * @returns DiscordUserConfig
6385
- * @throws ApiError
6386
- */
6387
- static aiBotV1BotsDiscordUserConfigUpdate({
6388
- id,
6389
- org,
6390
- requestBody
6391
- }) {
6392
- return request(OpenAPI, {
6393
- method: 'PUT',
6394
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
6395
- path: {
6396
- 'id': id,
6397
- 'org': org
6398
- },
6399
- body: requestBody,
6400
- mediaType: 'application/json'
6401
- });
6402
- }
6403
- /**
6404
- * Setup discord user id linkage with discord bots
6405
- * this will be used to authenticate the user when interracting with discord bots.
6406
- * the user id can be copied from the discord app after tapping on the user profile.
6407
- * @returns DiscordUserConfig
6408
- * @throws ApiError
6409
- */
6410
- static aiBotV1BotsDiscordUserConfigPartialUpdate({
6411
- id,
6412
- org,
6413
- requestBody
6414
- }) {
6415
- return request(OpenAPI, {
6416
- method: 'PATCH',
6417
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
6418
- path: {
6419
- 'id': id,
6420
- 'org': org
6421
- },
6422
- body: requestBody,
6423
- mediaType: 'application/json'
6424
- });
6425
- }
6426
- /**
6427
- * Setup discord user id linkage with discord bots
6428
- * this will be used to authenticate the user when interracting with discord bots.
6429
- * the user id can be copied from the discord app after tapping on the user profile.
6430
- * @returns void
6431
- * @throws ApiError
6432
- */
6433
- static aiBotV1BotsDiscordUserConfigDestroy({
6434
- id,
6435
- org
6436
- }) {
6437
- return request(OpenAPI, {
6438
- method: 'DELETE',
6439
- url: '/api/ai-bot/v1/bots/{org}/discord-user-config/{id}/',
6440
- path: {
6441
- 'id': id,
6442
- 'org': org
6443
- }
6444
- });
6445
- }
6446
- /**
6447
- * Setup slack username and domain linkage with slack bots
6448
- * this will be used to authenticate the user when interracting with slack bots.
6449
- * @returns SlackUserConfig
6450
- * @throws ApiError
6451
- */
6452
- static aiBotV1BotsSlackUserConfigList({
6453
- org
6454
- }) {
6455
- return request(OpenAPI, {
6456
- method: 'GET',
6457
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
6458
- path: {
6459
- 'org': org
6460
- }
6461
- });
6462
- }
6463
- /**
6464
- * Setup slack username and domain linkage with slack bots
6465
- * this will be used to authenticate the user when interracting with slack bots.
6466
- * @returns SlackUserConfig
6467
- * @throws ApiError
6468
- */
6469
- static aiBotV1BotsSlackUserConfigCreate({
6470
- org,
6471
- requestBody
6472
- }) {
6473
- return request(OpenAPI, {
6474
- method: 'POST',
6475
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/',
6476
- path: {
6477
- 'org': org
6478
- },
6479
- body: requestBody,
6480
- mediaType: 'application/json'
6481
- });
6482
- }
6483
- /**
6484
- * Setup slack username and domain linkage with slack bots
6485
- * this will be used to authenticate the user when interracting with slack bots.
6486
- * @returns SlackUserConfig
6487
- * @throws ApiError
6488
- */
6489
- static aiBotV1BotsSlackUserConfigRetrieve({
6490
- id,
6491
- org
6492
- }) {
6493
- return request(OpenAPI, {
6494
- method: 'GET',
6495
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
6496
- path: {
6497
- 'id': id,
6498
- 'org': org
6499
- }
6500
- });
6501
- }
6502
- /**
6503
- * Setup slack username and domain linkage with slack bots
6504
- * this will be used to authenticate the user when interracting with slack bots.
6505
- * @returns SlackUserConfig
6506
- * @throws ApiError
6507
- */
6508
- static aiBotV1BotsSlackUserConfigUpdate({
6509
- id,
6510
- org,
6511
- requestBody
6512
- }) {
6513
- return request(OpenAPI, {
6514
- method: 'PUT',
6515
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
6516
- path: {
6517
- 'id': id,
6518
- 'org': org
6519
- },
6520
- body: requestBody,
6521
- mediaType: 'application/json'
6522
- });
6523
- }
6524
- /**
6525
- * Setup slack username and domain linkage with slack bots
6526
- * this will be used to authenticate the user when interracting with slack bots.
6527
- * @returns SlackUserConfig
6528
- * @throws ApiError
6529
- */
6530
- static aiBotV1BotsSlackUserConfigPartialUpdate({
6531
- id,
6532
- org,
6533
- requestBody
6534
- }) {
6535
- return request(OpenAPI, {
6536
- method: 'PATCH',
6537
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
6538
- path: {
6539
- 'id': id,
6540
- 'org': org
6541
- },
6542
- body: requestBody,
6543
- mediaType: 'application/json'
6544
- });
6545
- }
6546
- /**
6547
- * Setup slack username and domain linkage with slack bots
6548
- * this will be used to authenticate the user when interracting with slack bots.
6549
- * @returns void
6550
- * @throws ApiError
6551
- */
6552
- static aiBotV1BotsSlackUserConfigDestroy({
6553
- id,
6554
- org
6555
- }) {
6556
- return request(OpenAPI, {
6557
- method: 'DELETE',
6558
- url: '/api/ai-bot/v1/bots/{org}/slack-user-config/{id}/',
6559
- path: {
6560
- 'id': id,
6561
- 'org': org
6562
- }
6563
- });
6564
- }
6565
- /**
6566
- * Setup phone number linkage with whatsapp bots
6567
- * This phone number will be used to authenticate and allow access to whatsapp bots.
6568
- * @returns WhatsappUserConfig
6569
- * @throws ApiError
6570
- */
6571
- static aiBotV1BotsWhatsappUserConfigList({
6572
- org
6573
- }) {
6574
- return request(OpenAPI, {
6575
- method: 'GET',
6576
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
6577
- path: {
6578
- 'org': org
6579
- }
6580
- });
6581
- }
6582
- /**
6583
- * Setup phone number linkage with whatsapp bots
6584
- * This phone number will be used to authenticate and allow access to whatsapp bots.
6585
- * @returns WhatsappUserConfig
6586
- * @throws ApiError
6587
- */
6588
- static aiBotV1BotsWhatsappUserConfigCreate({
6589
- org,
6590
- requestBody
6591
- }) {
6592
- return request(OpenAPI, {
6593
- method: 'POST',
6594
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/',
6595
- path: {
6596
- 'org': org
6597
- },
6598
- body: requestBody,
6599
- mediaType: 'application/json'
6600
- });
6601
- }
6602
- /**
6603
- * Setup phone number linkage with whatsapp bots
6604
- * This phone number will be used to authenticate and allow access to whatsapp bots.
6605
- * @returns WhatsappUserConfig
6606
- * @throws ApiError
6607
- */
6608
- static aiBotV1BotsWhatsappUserConfigRetrieve({
6609
- id,
6610
- org
6611
- }) {
6612
- return request(OpenAPI, {
6613
- method: 'GET',
6614
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
6615
- path: {
6616
- 'id': id,
6617
- 'org': org
6618
- }
6619
- });
6620
- }
6621
- /**
6622
- * Setup phone number linkage with whatsapp bots
6623
- * This phone number will be used to authenticate and allow access to whatsapp bots.
6624
- * @returns WhatsappUserConfig
6625
- * @throws ApiError
6626
- */
6627
- static aiBotV1BotsWhatsappUserConfigUpdate({
6628
- id,
6629
- org,
6630
- requestBody
6631
- }) {
6632
- return request(OpenAPI, {
6633
- method: 'PUT',
6634
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
6635
- path: {
6636
- 'id': id,
6637
- 'org': org
6638
- },
6639
- body: requestBody,
6640
- mediaType: 'application/json'
6641
- });
6642
- }
6643
- /**
6644
- * Setup phone number linkage with whatsapp bots
6645
- * This phone number will be used to authenticate and allow access to whatsapp bots.
6646
- * @returns WhatsappUserConfig
6647
- * @throws ApiError
6648
- */
6649
- static aiBotV1BotsWhatsappUserConfigPartialUpdate({
6650
- id,
6651
- org,
6652
- requestBody
6653
- }) {
6654
- return request(OpenAPI, {
6655
- method: 'PATCH',
6656
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
6657
- path: {
6658
- 'id': id,
6659
- 'org': org
6660
- },
6661
- body: requestBody,
6662
- mediaType: 'application/json'
6663
- });
6664
- }
6665
- /**
6666
- * Setup phone number linkage with whatsapp bots
6667
- * This phone number will be used to authenticate and allow access to whatsapp bots.
6668
- * @returns void
6669
- * @throws ApiError
6670
- */
6671
- static aiBotV1BotsWhatsappUserConfigDestroy({
6672
- id,
6673
- org
6674
- }) {
6675
- return request(OpenAPI, {
6676
- method: 'DELETE',
6677
- url: '/api/ai-bot/v1/bots/{org}/whatsapp-user-config/{id}/',
6678
- path: {
6679
- 'id': id,
6680
- 'org': org
6681
- }
6682
- });
6683
- }
6684
- /**
6685
- * Webhook endpoint to receive and process discord messages.
6686
- * @returns DiscordWebhook
6687
- * @throws ApiError
6688
- */
6689
- static aiBotV1BotsWebhooksDiscordCreate({
6690
- name,
6691
- org,
6692
- requestBody
6693
- }) {
6694
- return request(OpenAPI, {
6695
- method: 'POST',
6696
- url: '/api/ai-bot/v1/bots/webhooks/{org}/discord/{name}/',
6697
- path: {
6698
- 'name': name,
6699
- 'org': org
6700
- },
6701
- body: requestBody,
6702
- mediaType: 'application/json'
6703
- });
6704
- }
6705
- /**
6706
- * @returns SlackWebhook
6707
- * @throws ApiError
6708
- */
6709
- static aiBotV1BotsWebhooksSlackCreate({
6710
- name,
6711
- org,
6712
- requestBody
6713
- }) {
6714
- return request(OpenAPI, {
6715
- method: 'POST',
6716
- url: '/api/ai-bot/v1/bots/webhooks/{org}/slack/{name}/',
6717
- path: {
6718
- 'name': name,
6719
- 'org': org
6720
- },
6721
- body: requestBody,
6722
- mediaType: 'application/json'
6723
- });
6724
- }
6725
- /**
6726
- * @returns TeamsWebhook
6727
- * @throws ApiError
6728
- */
6729
- static aiBotV1BotsWebhooksTeamsCreate({
6730
- name,
6731
- org,
6732
- requestBody
6733
- }) {
6734
- return request(OpenAPI, {
6735
- method: 'POST',
6736
- url: '/api/ai-bot/v1/bots/webhooks/{org}/teams/{name}/',
6737
- path: {
6738
- 'name': name,
6739
- 'org': org
6740
- },
6741
- body: requestBody,
6742
- mediaType: 'application/json'
6743
- });
6744
- }
6745
- /**
6746
- * Webhook endpoint to receive and process discord messages.
6747
- * @returns WebexWebhook
6748
- * @throws ApiError
6749
- */
6750
- static aiBotV1BotsWebhooksWebexCreate({
6751
- name,
6752
- org,
6753
- requestBody
6754
- }) {
6755
- return request(OpenAPI, {
6756
- method: 'POST',
6757
- url: '/api/ai-bot/v1/bots/webhooks/{org}/webex/{name}/',
6758
- path: {
6759
- 'name': name,
6760
- 'org': org
6761
- },
6762
- body: requestBody,
6763
- mediaType: 'application/json'
6764
- });
6765
- }
6766
- /**
6767
- * Respond to whatsapp's webhook challenge.
6768
- * Parameters Required include the tenant key (org) and the name of the bot: (name)
6769
- * @returns WhatAppWebHook
6770
- * @throws ApiError
6771
- */
6772
- static aiBotV1BotsWebhooksWhatsappRetrieve({
6773
- name,
6774
- org
6775
- }) {
6776
- return request(OpenAPI, {
6777
- method: 'GET',
6778
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
6779
- path: {
6780
- 'name': name,
6781
- 'org': org
6782
- }
6783
- });
6784
- }
6785
- /**
6786
- * Accept and process webhook events from whatsapp.
6787
- * @returns WhatAppWebHook
6788
- * @throws ApiError
6789
- */
6790
- static aiBotV1BotsWebhooksWhatsappCreate({
6791
- name,
6792
- org,
6793
- requestBody
6794
- }) {
6795
- return request(OpenAPI, {
6796
- method: 'POST',
6797
- url: '/api/ai-bot/v1/bots/webhooks/{org}/whatsapp/{name}/',
6798
- path: {
6799
- 'name': name,
6800
- 'org': org
6801
- },
6802
- body: requestBody,
6803
- mediaType: 'application/json'
6804
- });
6805
- }
6806
- }
6807
-
6808
- class AiFinetuningService {
6809
- /**
6810
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6811
- * @returns PaginatedDataSetList
6812
- * @throws ApiError
6813
- */
6814
- static aiFinetuningV1OrgUserDatasetsList({
6815
- org,
6816
- username,
6817
- dateCreated,
6818
- numDataPoints,
6819
- ordering,
6820
- page,
6821
- pageSize,
6822
- retryAttempts,
6823
- search,
6824
- status
6825
- }) {
6826
- return request(OpenAPI, {
6827
- method: 'GET',
6828
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
6829
- path: {
6830
- 'org': org,
6831
- 'username': username
6832
- },
6833
- query: {
6834
- 'date_created': dateCreated,
6835
- 'num_data_points': numDataPoints,
6836
- 'ordering': ordering,
6837
- 'page': page,
6838
- 'page_size': pageSize,
6839
- 'retry_attempts': retryAttempts,
6840
- 'search': search,
6841
- 'status': status
6842
- }
6843
- });
6844
- }
6845
- /**
6846
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6847
- * @returns DataSetCreate
6848
- * @throws ApiError
6849
- */
6850
- static aiFinetuningV1OrgUserDatasetsCreate({
6851
- org,
6852
- username,
6853
- requestBody
6854
- }) {
6855
- return request(OpenAPI, {
6856
- method: 'POST',
6857
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/',
6858
- path: {
6859
- 'org': org,
6860
- 'username': username
6861
- },
6862
- body: requestBody,
6863
- mediaType: 'application/json'
6864
- });
6865
- }
6866
- /**
6867
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6868
- * @returns DataSet
6869
- * @throws ApiError
6870
- */
6871
- static aiFinetuningV1OrgUserDatasetsRetrieve({
6872
- id,
6873
- org,
6874
- username
6875
- }) {
6876
- return request(OpenAPI, {
6877
- method: 'GET',
6878
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
6879
- path: {
6880
- 'id': id,
6881
- 'org': org,
6882
- 'username': username
6883
- }
6884
- });
6885
- }
6886
- /**
6887
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6888
- * @returns DataSet
6889
- * @throws ApiError
6890
- */
6891
- static aiFinetuningV1OrgUserDatasetsUpdate({
6892
- id,
6893
- org,
6894
- username,
6895
- requestBody
6896
- }) {
6897
- return request(OpenAPI, {
6898
- method: 'PUT',
6899
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
6900
- path: {
6901
- 'id': id,
6902
- 'org': org,
6903
- 'username': username
6904
- },
6905
- body: requestBody,
6906
- mediaType: 'application/json'
6907
- });
6908
- }
6909
- /**
6910
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6911
- * @returns DataSet
6912
- * @throws ApiError
6913
- */
6914
- static aiFinetuningV1OrgUserDatasetsPartialUpdate({
6915
- id,
6916
- org,
6917
- username,
6918
- requestBody
6919
- }) {
6920
- return request(OpenAPI, {
6921
- method: 'PATCH',
6922
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
6923
- path: {
6924
- 'id': id,
6925
- 'org': org,
6926
- 'username': username
6927
- },
6928
- body: requestBody,
6929
- mediaType: 'application/json'
6930
- });
6931
- }
6932
- /**
6933
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6934
- * @returns void
6935
- * @throws ApiError
6936
- */
6937
- static aiFinetuningV1OrgUserDatasetsDestroy({
6938
- id,
6939
- org,
6940
- username
6941
- }) {
6942
- return request(OpenAPI, {
6943
- method: 'DELETE',
6944
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/datasets/{id}/',
6945
- path: {
6946
- 'id': id,
6947
- 'org': org,
6948
- 'username': username
6949
- }
6950
- });
6951
- }
6952
- /**
6953
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6954
- * @returns PaginatedTrainingList
6955
- * @throws ApiError
6956
- */
6957
- static aiFinetuningV1OrgUserTrainingsList({
6958
- org,
6959
- username,
6960
- baseModelName,
6961
- dataset,
6962
- dateCreated,
6963
- fineTunedModel,
6964
- lastModified,
6965
- ordering,
6966
- page,
6967
- pageSize,
6968
- preprocessDataset,
6969
- provider,
6970
- search,
6971
- status
6972
- }) {
6973
- return request(OpenAPI, {
6974
- method: 'GET',
6975
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
6976
- path: {
6977
- 'org': org,
6978
- 'username': username
6979
- },
6980
- query: {
6981
- 'base_model_name': baseModelName,
6982
- 'dataset': dataset,
6983
- 'date_created': dateCreated,
6984
- 'fine_tuned_model': fineTunedModel,
6985
- 'last_modified': lastModified,
6986
- 'ordering': ordering,
6987
- 'page': page,
6988
- 'page_size': pageSize,
6989
- 'preprocess_dataset': preprocessDataset,
6990
- 'provider': provider,
6991
- 'search': search,
6992
- 'status': status
6993
- }
6994
- });
6995
- }
6996
- /**
6997
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
6998
- * @returns TrainingCreate
6999
- * @throws ApiError
7000
- */
7001
- static aiFinetuningV1OrgUserTrainingsCreate({
7002
- org,
7003
- username,
7004
- requestBody
7005
- }) {
7006
- return request(OpenAPI, {
7007
- method: 'POST',
7008
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/',
7009
- path: {
7010
- 'org': org,
7011
- 'username': username
7012
- },
7013
- body: requestBody,
7014
- mediaType: 'application/json'
7015
- });
7016
- }
7017
- /**
7018
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
7019
- * @returns Training
7020
- * @throws ApiError
7021
- */
7022
- static aiFinetuningV1OrgUserTrainingsRetrieve({
7023
- id,
7024
- org,
7025
- username
7026
- }) {
7027
- return request(OpenAPI, {
7028
- method: 'GET',
7029
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
7030
- path: {
7031
- 'id': id,
7032
- 'org': org,
7033
- 'username': username
7034
- }
7035
- });
7036
- }
7037
- /**
7038
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
7039
- * @returns TrainingCreate
7040
- * @throws ApiError
7041
- */
7042
- static aiFinetuningV1OrgUserTrainingsUpdate({
7043
- id,
7044
- org,
7045
- username,
7046
- requestBody
7047
- }) {
7048
- return request(OpenAPI, {
7049
- method: 'PUT',
7050
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
7051
- path: {
7052
- 'id': id,
7053
- 'org': org,
7054
- 'username': username
7055
- },
7056
- body: requestBody,
7057
- mediaType: 'application/json'
7058
- });
7059
- }
7060
- /**
7061
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
7062
- * @returns TrainingCreate
7063
- * @throws ApiError
7064
- */
7065
- static aiFinetuningV1OrgUserTrainingsPartialUpdate({
7066
- id,
7067
- org,
7068
- username,
7069
- requestBody
7070
- }) {
7071
- return request(OpenAPI, {
7072
- method: 'PATCH',
7073
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
7074
- path: {
7075
- 'id': id,
7076
- 'org': org,
7077
- 'username': username
7078
- },
7079
- body: requestBody,
7080
- mediaType: 'application/json'
7081
- });
7082
- }
7083
- /**
7084
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
7085
- * @returns void
7086
- * @throws ApiError
7087
- */
7088
- static aiFinetuningV1OrgUserTrainingsDestroy({
7089
- id,
7090
- org,
7091
- username
7092
- }) {
7093
- return request(OpenAPI, {
7094
- method: 'DELETE',
7095
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/{id}/',
7096
- path: {
7097
- 'id': id,
7098
- 'org': org,
7099
- 'username': username
7100
- }
7101
- });
7102
- }
7103
- /**
7104
- * Retrieves a paginated list of completed fine-tuned models, excluding those without a fine-tuned model.
7105
- * Filtering and pagination is allowed.
7106
- *
7107
- * NB: This is only a helper endpoint. The same functionality can be achieved with the appropriate filters using the
7108
- * training list endpoint.
7109
- * Returns:
7110
- * Response: A paginated response containing the serialized fine-tuned models.
7111
- * @returns Training
7112
- * @throws ApiError
7113
- */
7114
- static aiFinetuningV1OrgUserTrainingsFinetunedModelsRetrieve({
7115
- org,
7116
- username
7117
- }) {
7118
- return request(OpenAPI, {
7119
- method: 'GET',
7120
- url: '/api/ai-finetuning/v1/org/{org}/user/{username}/trainings/finetuned-models/',
7121
- path: {
7122
- 'org': org,
7123
- 'username': username
7124
- }
7125
- });
7126
- }
7127
- }
7128
-
7129
- class AiIndexService {
7130
- /**
7131
- * Retrieve details of a specific document embedding.
7132
- *
7133
- * This endpoint returns detailed information about a specific
7134
- * document embedding identified by its ID.
7135
- *
7136
- * Args:
7137
- * request: The HTTP request.
7138
- * org: Organization key identifier.
7139
- * document_id: The ID of the document embedding to retrieve.
7140
- *
7141
- * Returns:
7142
- * Response: Detailed information about the document embedding.
7143
- *
7144
- * Raises:
7145
- * NotFound: If the specified document embedding does not exist.
7146
- * @returns RetrieverDocumentEmbedding
7147
- * @throws ApiError
7148
- */
7149
- static aiIndexOrgsUsersDocumentsRetrieve({
7150
- documentId,
7151
- org,
7152
- userId
7153
- }) {
7154
- return request(OpenAPI, {
7155
- method: 'GET',
7156
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
7157
- path: {
7158
- 'document_id': documentId,
7159
- 'org': org,
7160
- 'user_id': userId
7161
- },
7162
- errors: {
7163
- 404: `Document not found`
7164
- }
7165
- });
7166
- }
7167
- /**
7168
- * Update a specific document embedding.
7169
- *
7170
- * This endpoint allows updating various properties of a document embedding,
7171
- * including its name, type, pathway, and training status.
7172
- *
7173
- * Args:
7174
- * request: The HTTP request containing the updated document data.
7175
- * org: Organization key identifier.
7176
- * document_id: The ID of the document embedding to update.
7177
- *
7178
- * Returns:
7179
- * Response: The updated document embedding information.
7180
- *
7181
- * Raises:
7182
- * BadRequest: If the provided data is invalid.
7183
- * NotFound: If the specified document embedding does not exist.
7184
- * @returns RetrieverDocumentEmbedding
7185
- * @throws ApiError
7186
- */
7187
- static aiIndexOrgsUsersDocumentsUpdate({
7188
- documentId,
7189
- org,
7190
- userId,
7191
- formData
7192
- }) {
7193
- return request(OpenAPI, {
7194
- method: 'PUT',
7195
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
7196
- path: {
7197
- 'document_id': documentId,
7198
- 'org': org,
7199
- 'user_id': userId
7200
- },
7201
- formData: formData,
7202
- mediaType: 'multipart/form-data',
7203
- errors: {
7204
- 400: `Invalid request data`,
7205
- 404: `Document not found`
7206
- }
7207
- });
7208
- }
7209
- /**
7210
- * Delete a specific document embedding.
7211
- *
7212
- * This endpoint removes a document embedding from the system,
7213
- * including untraining it from any associated pathways.
7214
- *
7215
- * Args:
7216
- * request: The HTTP request.
7217
- * org: Organization key identifier.
7218
- * document_id: The ID of the document embedding to delete.
7219
- *
7220
- * Returns:
7221
- * Response: An empty response with a 204 status code if successful.
7222
- *
7223
- * Raises:
7224
- * NotFound: If the specified document embedding does not exist.
7225
- * @returns void
7226
- * @throws ApiError
7227
- */
7228
- static aiIndexOrgsUsersDocumentsDestroy({
7229
- documentId,
7230
- org,
7231
- userId
7232
- }) {
7233
- return request(OpenAPI, {
7234
- method: 'DELETE',
7235
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/',
7236
- path: {
7237
- 'document_id': documentId,
7238
- 'org': org,
7239
- 'user_id': userId
7240
- },
7241
- errors: {
7242
- 404: `Document not found`
7243
- }
7244
- });
7245
- }
7246
- /**
7247
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
7248
- * @returns DocumentSettingsResponse
7249
- * @throws ApiError
7250
- */
7251
- static aiIndexOrgsUsersDocumentsSettingsRetrieve({
7252
- documentId,
7253
- org,
7254
- userId
7255
- }) {
7256
- return request(OpenAPI, {
7257
- method: 'GET',
7258
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
7259
- path: {
7260
- 'document_id': documentId,
7261
- 'org': org,
7262
- 'user_id': userId
7263
- }
7264
- });
7265
- }
7266
- /**
7267
- * Mixin that includes the StudentTokenAuthentication and IsPlatformAdmin
7268
- * @returns DocumentSettingsResponse
7269
- * @throws ApiError
7270
- */
7271
- static aiIndexOrgsUsersDocumentsSettingsCreate({
7272
- documentId,
7273
- org,
7274
- userId,
7275
- requestBody
7276
- }) {
7277
- return request(OpenAPI, {
7278
- method: 'POST',
7279
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/{document_id}/settings/',
7280
- path: {
7281
- 'document_id': documentId,
7282
- 'org': org,
7283
- 'user_id': userId
7284
- },
7285
- body: requestBody,
7286
- mediaType: 'application/json'
7287
- });
7288
- }
7289
- /**
7290
- * Train a graph-based document through a worker process.
7291
- *
7292
- * This endpoint queues graph-based documents for training through a
7293
- * specialized worker process that handles knowledge graph processing.
7294
- *
7295
- * Args:
7296
- * request: The HTTP request containing the document information.
7297
- * org: Organization key identifier.
7298
- *
7299
- * Returns:
7300
- * Response: A confirmation that the document was queued for training,
7301
- * including a task ID for tracking the progress.
7302
- *
7303
- * Raises:
7304
- * ValidationError: If the request data is invalid.
7305
- * BadRequest: If there was an error processing the document.
7306
- * @returns TrainDocumentViewResponse
7307
- * @throws ApiError
7308
- */
7309
- static aiIndexOrgsUsersDocumentsGraphTrainCreate({
7310
- org,
7311
- userId,
7312
- formData
7313
- }) {
7314
- return request(OpenAPI, {
7315
- method: 'POST',
7316
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/graph-train/',
7317
- path: {
7318
- 'org': org,
7319
- 'user_id': userId
7320
- },
7321
- formData: formData,
7322
- mediaType: 'multipart/form-data',
7323
- errors: {
7324
- 400: `Invalid request data or document processing error`
7325
- }
7326
- });
7327
- }
7328
- /**
7329
- * Description:
7330
- * Retrieves a list of document embeddings for a specific pathway with optional search and pagination.
7331
- *
7332
- * Methods:
7333
- * - GET: Retrieves document embeddings that match the specified search criteria and are paginated according to offset and limit.
7334
- *
7335
- * Parameters:
7336
- * - search (str): Search query to filter document names or URLs.
7337
- * - offset (int): Offset number for pagination.
7338
- * - limit (int): Limit number for pagination.
7339
- *
7340
- * Returns:
7341
- * - GET: A paginated list of document embeddings with their details.
7342
- * {
7343
- * "count": 10,
7344
- * "next": "http://api.example.com/retriever_documents/?offset=10&limit=2",
7345
- * "previous": "http://api.example.com/retriever_documents/?offset=0&limit=2",
7346
- * "results": [
7347
- * {
7348
- * "document_name": "Document2",
7349
- * "platform_key": "example_platform",
7350
- * "pathway": "example_pathway"
7351
- * }
7352
- * ]
7353
- * }
7354
- *
7355
- * Error Responses:
7356
- * - 400 Bad Request: Invalid query parameters.
7357
- * - 404 Not Found: No document embeddings found for the specified criteria.
7358
- * @returns RetrieverDocumentEmbedding
7359
- * @throws ApiError
7360
- */
7361
- static aiIndexOrgsUsersDocumentsPathwaysList({
7362
- org,
7363
- pathway,
7364
- userId,
7365
- limit,
7366
- offset,
7367
- search
7368
- }) {
7369
- return request(OpenAPI, {
7370
- method: 'GET',
7371
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/pathways/{pathway}/',
7372
- path: {
7373
- 'org': org,
7374
- 'pathway': pathway,
7375
- 'user_id': userId
7376
- },
7377
- query: {
7378
- 'limit': limit,
7379
- 'offset': offset,
7380
- 'search': search
7381
- }
7382
- });
7383
- }
7384
- /**
7385
- * Retrieve resource documents similar to the given query.
7386
- *
7387
- * This endpoint performs a semantic search to find documents that are
7388
- * relevant to the provided query within the specified pathway.
7389
- *
7390
- * Args:
7391
- * request: The HTTP request containing the search query.
7392
- * org: Organization key identifier.
7393
- *
7394
- * Returns:
7395
- * Response: A list of documents relevant to the search query.
7396
- *
7397
- * Raises:
7398
- * ValidationError: If the request data is invalid.
7399
- * @returns RetrieverResponseSearch
7400
- * @throws ApiError
7401
- */
7402
- static aiIndexOrgsUsersDocumentsSearchCreate({
7403
- org,
7404
- userId,
7405
- requestBody
7406
- }) {
7407
- return request(OpenAPI, {
7408
- method: 'POST',
7409
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/search/',
7410
- path: {
7411
- 'org': org,
7412
- 'user_id': userId
7413
- },
7414
- body: requestBody,
7415
- mediaType: 'application/json',
7416
- errors: {
7417
- 400: `Invalid request data`
7418
- }
7419
- });
7420
- }
7421
- /**
7422
- * Retrieve document sources related to a given query.
7423
- *
7424
- * This endpoint performs a semantic search to find document sources
7425
- * that are relevant to the provided query within the specified pathway,
7426
- * and returns them along with confidence levels.
7427
- *
7428
- * Args:
7429
- * request: The HTTP request containing the search query.
7430
- * org: Organization key identifier.
7431
- *
7432
- * Returns:
7433
- * Response: A list of document sources with confidence levels.
7434
- *
7435
- * Raises:
7436
- * ValidationError: If the request data is invalid.
7437
- * @returns RetrieverRequestSearchDocument
7438
- * @throws ApiError
7439
- */
7440
- static aiIndexOrgsUsersDocumentsSourcesCreate({
7441
- org,
7442
- userId,
7443
- requestBody
7444
- }) {
7445
- return request(OpenAPI, {
7446
- method: 'POST',
7447
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/sources/',
7448
- path: {
7449
- 'org': org,
7450
- 'user_id': userId
7451
- },
7452
- body: requestBody,
7453
- mediaType: 'application/json',
7454
- errors: {
7455
- 400: `Invalid request data`
7456
- }
7457
- });
7458
- }
7459
- /**
7460
- * Check the status of a document training task.
7461
- *
7462
- * This endpoint retrieves the current status of an asynchronous
7463
- * document training task that was previously initiated.
7464
- *
7465
- * Args:
7466
- * request: The HTTP request.
7467
- * org: Organization key identifier.
7468
- * task_id: The ID of the training task to check.
7469
- *
7470
- * Returns:
7471
- * Response: The current status of the document training task,
7472
- * which can be "pending", "completed", or "failed".
7473
- * @returns CheckDocumentTrainingStatus
7474
- * @throws ApiError
7475
- */
7476
- static aiIndexOrgsUsersDocumentsTasksRetrieve({
7477
- org,
7478
- taskId,
7479
- userId
7480
- }) {
7481
- return request(OpenAPI, {
7482
- method: 'GET',
7483
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/tasks/{task_id}/',
7484
- path: {
7485
- 'org': org,
7486
- 'task_id': taskId,
7487
- 'user_id': userId
7488
- }
7489
- });
7490
- }
7491
- /**
7492
- * Train a document through a worker process.
7493
- *
7494
- * This endpoint queues larger documents for training through a worker
7495
- * process, which is more suitable for handling documents that would
7496
- * take too long to process directly.
7497
- *
7498
- * Args:
7499
- * request: The HTTP request containing the document information.
7500
- * org: Organization key identifier.
7501
- *
7502
- * Returns:
7503
- * Response: A confirmation that the document was queued for training,
7504
- * including a task ID for tracking the progress.
7505
- *
7506
- * Raises:
7507
- * ValidationError: If the request data is invalid.
7508
- * BadRequest: If there was an error processing the document.
7509
- * @returns TrainDocumentViewResponse
7510
- * @throws ApiError
7511
- */
7512
- static aiIndexOrgsUsersDocumentsTrainCreate({
7513
- org,
7514
- userId,
7515
- formData
7516
- }) {
7517
- return request(OpenAPI, {
7518
- method: 'POST',
7519
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/',
7520
- path: {
7521
- 'org': org,
7522
- 'user_id': userId
7523
- },
7524
- formData: formData,
7525
- mediaType: 'multipart/form-data',
7526
- errors: {
7527
- 400: `Invalid request data`
7528
- }
7529
- });
7530
- }
7531
- /**
7532
- * Train a document directly without using a worker.
7533
- *
7534
- * This endpoint is designed for training smaller documents directly
7535
- * without queuing them through a worker process. For larger documents,
7536
- * use the TrainDocumentView endpoint instead.
7537
- *
7538
- * Args:
7539
- * request: The HTTP request containing the document information.
7540
- * org: Organization key identifier.
7541
- *
7542
- * Returns:
7543
- * Response: A confirmation that the document was trained successfully.
7544
- *
7545
- * Raises:
7546
- * ValidationError: If the request data is invalid.
7547
- * BadRequest: If the document training failed.
7548
- * @returns RetreiverTrainViewResponse
7549
- * @throws ApiError
7550
- */
7551
- static aiIndexOrgsUsersDocumentsTrainRetrieverCreate({
7552
- org,
7553
- userId,
7554
- formData
7555
- }) {
7556
- return request(OpenAPI, {
7557
- method: 'POST',
7558
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/retriever/',
7559
- path: {
7560
- 'org': org,
7561
- 'user_id': userId
7562
- },
7563
- formData: formData,
7564
- mediaType: 'multipart/form-data',
7565
- errors: {
7566
- 400: `Invalid request data or training failed`
7567
- }
7568
- });
7569
- }
7570
- /**
7571
- * Description:
7572
- * Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
7573
- * Process document for use in a specific chat session.
7574
- * which will be processed and made available for the AI to reference
7575
- * when responding to queries in that session.
7576
- *
7577
- * Methods:
7578
- * - POST: Submits a document or media file for training within a specified chat session.
7579
- *
7580
- * Parameters:
7581
- * - org (str):
7582
- * - session_id (str): UUID of the chat session for which the document is being submitted.
7583
- * - *args, **kwargs: Additional arguments.
7584
- * - file (file): Multipart file input.
7585
- *
7586
- * Returns:
7587
- * - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
7588
- * {
7589
- * "message": "File processed."
7590
- * }
7591
- *
7592
- * Error Responses:
7593
- * - 400 Bad Request:
7594
- * - "File field is required" if the 'file' parameter is missing.
7595
- * - "invalid file object" if the file object is not valid.
7596
- * - Specific error message if an exception occurs while saving to Redis.
7597
- * - 404 Not Found:
7598
- * - "Session not found" if the provided session_id does not match any existing session.
7599
- * - 413 Request Entity Too Large:
7600
- * - "file is too large" including specific limits for document and media files if the file exceeds size limits.
7601
- *
7602
- * Access Control:
7603
- * Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
7604
- * @returns TrainChatSessionDocumentView
7605
- * @throws ApiError
7606
- */
7607
- static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
7608
- org,
7609
- sessionId,
7610
- userId,
7611
- formData
7612
- }) {
7613
- return request(OpenAPI, {
7614
- method: 'POST',
7615
- url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
7616
- path: {
7617
- 'org': org,
7618
- 'session_id': sessionId,
7619
- 'user_id': userId
7620
- },
7621
- formData: formData,
7622
- mediaType: 'multipart/form-data',
7623
- errors: {
7624
- 400: `Invalid file or processing error`,
7625
- 413: `File too large`
7626
- }
6230
+ formData: formData,
6231
+ mediaType: 'multipart/form-data',
6232
+ errors: {
6233
+ 400: `Invalid file or processing error`,
6234
+ 413: `File too large`
6235
+ }
7627
6236
  });
7628
6237
  }
7629
6238
  /**
@@ -8584,7 +7193,7 @@ class AiMentorService {
8584
7193
  });
8585
7194
  }
8586
7195
  /**
8587
- * Update a mentor's details.
7196
+ * Update a mentor's details with RBAC enforcement and custom serializer handling.
8588
7197
  * @returns Mentor
8589
7198
  * @throws ApiError
8590
7199
  */
@@ -12136,7 +10745,8 @@ class AiMentorService {
12136
10745
  */
12137
10746
  static aiMentorOrgsUsersMentorLlmsList({
12138
10747
  org,
12139
- userId
10748
+ userId,
10749
+ mentorId
12140
10750
  }) {
12141
10751
  return request(OpenAPI, {
12142
10752
  method: 'GET',
@@ -12144,6 +10754,9 @@ class AiMentorService {
12144
10754
  path: {
12145
10755
  'org': org,
12146
10756
  'user_id': userId
10757
+ },
10758
+ query: {
10759
+ 'mentor_id': mentorId
12147
10760
  }
12148
10761
  });
12149
10762
  }
@@ -35007,8 +33620,6 @@ class UserGroupsService {
35007
33620
 
35008
33621
  exports.AiAccountService = AiAccountService;
35009
33622
  exports.AiAnalyticsService = AiAnalyticsService;
35010
- exports.AiBotService = AiBotService;
35011
- exports.AiFinetuningService = AiFinetuningService;
35012
33623
  exports.AiIndexService = AiIndexService;
35013
33624
  exports.AiMarketingService = AiMarketingService;
35014
33625
  exports.AiMediaService = AiMediaService;