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