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