@iblai/iblai-api 4.125.0-test-ai → 4.125.1-ai
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +60 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +60 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +60 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/models/TrainChatSessionDocumentView.d.ts +6 -0
- package/dist/types/models/TrainChatSessionDocumentViewRequest.d.ts +6 -0
- package/dist/types/services/AiIndexService.d.ts +44 -0
- package/package.json +1 -1
- package/sdk_schema.yml +108 -1
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +2 -0
- package/src/models/TrainChatSessionDocumentView.ts +11 -0
- package/src/models/TrainChatSessionDocumentViewRequest.ts +11 -0
- package/src/services/AiIndexService.ts +188 -122
|
@@ -16,6 +16,8 @@ import type { RetrieverRequestSearchDocument } from '../models/RetrieverRequestS
|
|
|
16
16
|
import type { RetrieverResponseSearch } from '../models/RetrieverResponseSearch';
|
|
17
17
|
import type { ScanWebhookRequest } from '../models/ScanWebhookRequest';
|
|
18
18
|
import type { ScanWebhookResponse } from '../models/ScanWebhookResponse';
|
|
19
|
+
import type { TrainChatSessionDocumentView } from '../models/TrainChatSessionDocumentView';
|
|
20
|
+
import type { TrainChatSessionDocumentViewRequest } from '../models/TrainChatSessionDocumentViewRequest';
|
|
19
21
|
import type { TrainDocumentViewRequest } from '../models/TrainDocumentViewRequest';
|
|
20
22
|
import type { TrainDocumentViewResponse } from '../models/TrainDocumentViewResponse';
|
|
21
23
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
@@ -515,130 +517,194 @@ export class AiIndexService {
|
|
|
515
517
|
});
|
|
516
518
|
}
|
|
517
519
|
/**
|
|
518
|
-
*
|
|
520
|
+
* Description:
|
|
521
|
+
* Submit a document file in a chat session. Checks file type, size, and ensures the session exists, then processes the file.
|
|
522
|
+
* Process document for use in a specific chat session.
|
|
523
|
+
* which will be processed and made available for the AI to reference
|
|
524
|
+
* when responding to queries in that session.
|
|
519
525
|
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
526
|
+
* Methods:
|
|
527
|
+
* - POST: Submits a document or media file for training within a specified chat session.
|
|
522
528
|
*
|
|
523
|
-
*
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
*
|
|
529
|
+
* Parameters:
|
|
530
|
+
* - org (str):
|
|
531
|
+
* - session_id (str): UUID of the chat session for which the document is being submitted.
|
|
532
|
+
* - *args, **kwargs: Additional arguments.
|
|
533
|
+
* - file (file): Multipart file input.
|
|
528
534
|
*
|
|
529
535
|
* Returns:
|
|
530
|
-
*
|
|
531
|
-
*
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
536
|
+
* - POST: Returns a JSON message with the result of the upload process. Response code 200 on success.
|
|
537
|
+
* {
|
|
538
|
+
* "message": "File processed."
|
|
539
|
+
* }
|
|
540
|
+
*
|
|
541
|
+
* Error Responses:
|
|
542
|
+
* - 400 Bad Request:
|
|
543
|
+
* - "File field is required" if the 'file' parameter is missing.
|
|
544
|
+
* - "invalid file object" if the file object is not valid.
|
|
545
|
+
* - Specific error message if an exception occurs while saving to Redis.
|
|
546
|
+
* - 404 Not Found:
|
|
547
|
+
* - "Session not found" if the provided session_id does not match any existing session.
|
|
548
|
+
* - 413 Request Entity Too Large:
|
|
549
|
+
* - "file is too large" including specific limits for document and media files if the file exceeds size limits.
|
|
550
|
+
*
|
|
551
|
+
* Access Control:
|
|
552
|
+
* Requires authentication with a Bearer token in the Authorization header. The user associated with the session must exist and be authorized for the request.
|
|
553
|
+
* @returns TrainChatSessionDocumentView
|
|
554
|
+
* @throws ApiError
|
|
555
|
+
*/
|
|
556
|
+
public static aiIndexOrgsUsersDocumentsTrainSessionsCreate({
|
|
557
|
+
org,
|
|
558
|
+
sessionId,
|
|
559
|
+
userId,
|
|
560
|
+
formData,
|
|
561
|
+
}: {
|
|
562
|
+
org: string,
|
|
563
|
+
sessionId: string,
|
|
564
|
+
userId: string,
|
|
565
|
+
formData: TrainChatSessionDocumentViewRequest,
|
|
566
|
+
}): CancelablePromise<TrainChatSessionDocumentView> {
|
|
567
|
+
return __request(OpenAPI, {
|
|
568
|
+
method: 'POST',
|
|
569
|
+
url: '/api/ai-index/orgs/{org}/users/{user_id}/documents/train/sessions/{session_id}/',
|
|
570
|
+
path: {
|
|
571
|
+
'org': org,
|
|
572
|
+
'session_id': sessionId,
|
|
573
|
+
'user_id': userId,
|
|
574
|
+
},
|
|
575
|
+
formData: formData,
|
|
576
|
+
mediaType: 'multipart/form-data',
|
|
577
|
+
errors: {
|
|
578
|
+
400: `Invalid file or processing error`,
|
|
579
|
+
413: `File too large`,
|
|
580
|
+
},
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Retrieve detailed information about a specific scraped resource.
|
|
585
|
+
*
|
|
586
|
+
* This endpoint returns the complete scraped data for a specific resource
|
|
587
|
+
* identified by its ID.
|
|
588
|
+
*
|
|
589
|
+
* Args:
|
|
590
|
+
* request: The HTTP request.
|
|
591
|
+
* org: Organization key identifier.
|
|
592
|
+
* user_id: The username of the user associated with the resource.
|
|
593
|
+
* resource_id: The ID of the resource to retrieve.
|
|
594
|
+
*
|
|
595
|
+
* Returns:
|
|
596
|
+
* Response: The complete scraped data for the specified resource.
|
|
597
|
+
*
|
|
598
|
+
* Raises:
|
|
599
|
+
* NotFound: If the specified resource data does not exist.
|
|
600
|
+
* @returns ResourceScrappedData
|
|
601
|
+
* @throws ApiError
|
|
602
|
+
*/
|
|
603
|
+
public static aiIndexOrgsUsersResourceDataScrappedRetrieve({
|
|
604
|
+
org,
|
|
605
|
+
resourceId,
|
|
606
|
+
userId,
|
|
607
|
+
}: {
|
|
608
|
+
org: string,
|
|
609
|
+
resourceId: string,
|
|
610
|
+
userId: string,
|
|
611
|
+
}): CancelablePromise<ResourceScrappedData> {
|
|
612
|
+
return __request(OpenAPI, {
|
|
613
|
+
method: 'GET',
|
|
614
|
+
url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/{resource_id}/data/scrapped/',
|
|
615
|
+
path: {
|
|
616
|
+
'org': org,
|
|
617
|
+
'resource_id': resourceId,
|
|
618
|
+
'user_id': userId,
|
|
619
|
+
},
|
|
620
|
+
errors: {
|
|
621
|
+
404: `Resource data not found`,
|
|
622
|
+
},
|
|
623
|
+
});
|
|
624
|
+
}
|
|
625
|
+
/**
|
|
626
|
+
* Retrieve and filter scraped data from resources.
|
|
627
|
+
*
|
|
628
|
+
* This endpoint returns a list of scraped data from resources associated
|
|
629
|
+
* with the specified user, with optional filtering based on query parameters.
|
|
630
|
+
*
|
|
631
|
+
* Args:
|
|
632
|
+
* request: The HTTP request containing filter query parameters.
|
|
633
|
+
* org: Organization key identifier.
|
|
634
|
+
* user_id: The username of the user whose resources to retrieve.
|
|
635
|
+
*
|
|
636
|
+
* Returns:
|
|
637
|
+
* Response: A list of scraped resource data matching the filter criteria.
|
|
638
|
+
*
|
|
639
|
+
* Raises:
|
|
640
|
+
* BadRequest: If the username is invalid or query parameters are incorrect.
|
|
641
|
+
* @returns ResourceScrappedData
|
|
642
|
+
* @throws ApiError
|
|
643
|
+
*/
|
|
644
|
+
public static aiIndexOrgsUsersResourceDataScrappedList({
|
|
645
|
+
org,
|
|
646
|
+
userId,
|
|
647
|
+
isArchive,
|
|
648
|
+
isLike,
|
|
649
|
+
isVideo,
|
|
650
|
+
searchKey,
|
|
651
|
+
}: {
|
|
652
|
+
org: string,
|
|
653
|
+
userId: string,
|
|
654
|
+
isArchive?: boolean | null,
|
|
655
|
+
isLike?: boolean | null,
|
|
656
|
+
isVideo?: boolean | null,
|
|
657
|
+
searchKey?: string,
|
|
658
|
+
}): CancelablePromise<Array<ResourceScrappedData>> {
|
|
659
|
+
return __request(OpenAPI, {
|
|
660
|
+
method: 'GET',
|
|
661
|
+
url: '/api/ai-index/orgs/{org}/users/{user_id}/resource/data/scrapped/',
|
|
662
|
+
path: {
|
|
663
|
+
'org': org,
|
|
664
|
+
'user_id': userId,
|
|
665
|
+
},
|
|
666
|
+
query: {
|
|
667
|
+
'is_archive': isArchive,
|
|
668
|
+
'is_like': isLike,
|
|
669
|
+
'is_video': isVideo,
|
|
670
|
+
'search_key': searchKey,
|
|
671
|
+
},
|
|
672
|
+
errors: {
|
|
673
|
+
400: `Invalid username or query parameters`,
|
|
674
|
+
},
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Receive and process file scan status from external security scanning services.
|
|
679
|
+
*
|
|
680
|
+
* This webhook endpoint receives scan results for files that have been submitted
|
|
681
|
+
* for security scanning. It processes the results asynchronously and determines
|
|
682
|
+
* if the files are safe for further processing.
|
|
683
|
+
*
|
|
684
|
+
* Args:
|
|
685
|
+
* request: The HTTP request containing scan result data.
|
|
686
|
+
*
|
|
687
|
+
* Returns:
|
|
688
|
+
* Response: A confirmation that the scan result was received and is being processed.
|
|
689
|
+
*
|
|
690
|
+
* Raises:
|
|
691
|
+
* BadRequest: If the provided scan result data is invalid.
|
|
692
|
+
* @returns ScanWebhookResponse
|
|
693
|
+
* @throws ApiError
|
|
694
|
+
*/
|
|
695
|
+
public static aiIndexWebhookScanCreate({
|
|
696
|
+
requestBody,
|
|
697
|
+
}: {
|
|
698
|
+
requestBody: ScanWebhookRequest,
|
|
699
|
+
}): CancelablePromise<ScanWebhookResponse> {
|
|
700
|
+
return __request(OpenAPI, {
|
|
701
|
+
method: 'POST',
|
|
702
|
+
url: '/api/ai-index/webhook/scan/',
|
|
703
|
+
body: requestBody,
|
|
704
|
+
mediaType: 'application/json',
|
|
705
|
+
errors: {
|
|
706
|
+
400: `Invalid request data`,
|
|
707
|
+
},
|
|
708
|
+
});
|
|
709
|
+
}
|
|
643
710
|
}
|
|
644
|
-
}
|