@usecortex_ai/node 0.3.6 → 0.5.0
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/LICENSE +23 -23
- package/README.md +141 -141
- package/dist/Client.d.ts +20 -24
- package/dist/Client.js +26 -34
- package/dist/api/errors/BadRequestError.d.ts +1 -2
- package/dist/api/errors/BadRequestError.js +0 -0
- package/dist/api/errors/ForbiddenError.d.ts +1 -2
- package/dist/api/errors/ForbiddenError.js +0 -0
- package/dist/api/errors/InternalServerError.d.ts +1 -2
- package/dist/api/errors/InternalServerError.js +0 -0
- package/dist/api/errors/NotFoundError.d.ts +1 -2
- package/dist/api/errors/NotFoundError.js +0 -0
- package/dist/api/errors/ServiceUnavailableError.d.ts +1 -2
- package/dist/api/errors/ServiceUnavailableError.js +0 -0
- package/dist/api/errors/TooManyRequestsError.d.ts +9 -0
- package/dist/api/errors/TooManyRequestsError.js +42 -0
- package/dist/api/errors/UnauthorizedError.d.ts +1 -2
- package/dist/api/errors/UnauthorizedError.js +0 -0
- package/dist/api/errors/UnprocessableEntityError.d.ts +0 -0
- package/dist/api/errors/UnprocessableEntityError.js +0 -0
- package/dist/api/errors/index.d.ts +1 -0
- package/dist/api/errors/index.js +1 -0
- package/dist/api/index.d.ts +0 -0
- package/dist/api/index.js +0 -0
- package/dist/api/resources/dashboard/client/Client.d.ts +136 -0
- package/dist/api/resources/{userMemory → dashboard}/client/Client.js +191 -138
- package/dist/api/resources/{user → dashboard}/client/index.d.ts +0 -0
- package/dist/api/resources/{user → dashboard}/client/index.js +0 -0
- package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.d.ts +12 -0
- package/dist/api/resources/{embeddings/client/requests/EmbeddingsCreateCollectionRequest.js → dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.js} +0 -0
- package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts +16 -0
- package/dist/api/resources/{embeddings/client/requests/EmbeddingsSearchRequest.js → dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.js} +0 -0
- package/dist/api/resources/dashboard/client/requests/index.d.ts +2 -0
- package/dist/api/resources/{document/client → dashboard/client/requests}/index.js +0 -0
- package/dist/api/resources/{document → dashboard}/index.d.ts +0 -0
- package/dist/api/resources/{document → dashboard}/index.js +0 -0
- package/dist/api/resources/embeddings/client/Client.d.ts +40 -27
- package/dist/api/resources/embeddings/client/Client.js +68 -44
- package/dist/api/resources/embeddings/client/index.d.ts +0 -0
- package/dist/api/resources/embeddings/client/index.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.d.ts +24 -0
- package/dist/api/resources/embeddings/client/requests/{GetEmbeddingsBasedOnChunkIdsRequest.js → BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js} +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +27 -0
- package/dist/api/resources/{fetch/client/requests/FetchContentRequest.js → embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js} +0 -0
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +25 -0
- package/dist/api/resources/{search/client/requests/QnARequest.js → embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js} +0 -0
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +6 -5
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.js +0 -0
- package/dist/api/resources/embeddings/client/requests/index.d.ts +3 -3
- package/dist/api/resources/embeddings/client/requests/index.js +0 -0
- package/dist/api/resources/embeddings/index.d.ts +0 -0
- package/dist/api/resources/embeddings/index.js +0 -0
- package/dist/api/resources/fetch/client/Client.d.ts +96 -7
- package/dist/api/resources/fetch/client/Client.js +288 -10
- package/dist/api/resources/fetch/client/index.d.ts +0 -0
- package/dist/api/resources/fetch/client/index.js +0 -0
- package/dist/api/resources/{sources/client/requests/SourcesGetGraphRelationsByIdRequest.d.ts → fetch/client/requests/FetchGraphRelationsBySourceIdRequest.d.ts} +2 -3
- package/dist/api/resources/{search/client/requests/SearchRequest.js → fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js} +0 -0
- package/dist/api/resources/{sources/client/requests/SourcesGetAllRequest.d.ts → fetch/client/requests/FetchSourcesRequest.d.ts} +2 -3
- package/dist/api/resources/{sources/client/requests/SourceBodyParams.js → fetch/client/requests/FetchSourcesRequest.js} +0 -0
- package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +18 -0
- package/dist/api/resources/{sources/client/requests/SourcesGetAllRequest.js → fetch/client/requests/ListSourcesByIdRequest.js} +0 -0
- package/dist/api/resources/{upload/client/requests/UploadUpdateTextRequest.d.ts → fetch/client/requests/SourceFetchRequest.d.ts} +9 -10
- package/dist/api/resources/{sources/client/requests/SourcesGetGraphRelationsByIdRequest.js → fetch/client/requests/SourceFetchRequest.js} +0 -0
- package/dist/api/resources/fetch/client/requests/index.d.ts +4 -1
- package/dist/api/resources/fetch/client/requests/index.js +0 -0
- package/dist/api/resources/fetch/index.d.ts +0 -0
- package/dist/api/resources/fetch/index.js +0 -0
- package/dist/api/resources/index.d.ts +10 -13
- package/dist/api/resources/index.js +11 -14
- package/dist/api/resources/search/client/Client.d.ts +55 -26
- package/dist/api/resources/search/client/Client.js +70 -35
- package/dist/api/resources/search/client/index.d.ts +0 -0
- package/dist/api/resources/search/client/index.js +0 -0
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.d.ts +6 -4
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/{SearchRequest.d.ts → HybridSearchRequest.d.ts} +15 -9
- package/dist/api/resources/{tenant/client/requests/TenantDeleteSubTenantRequest.js → search/client/requests/HybridSearchRequest.js} +0 -0
- package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +39 -0
- package/dist/api/resources/{tenant/client/requests/TenantGetSubTenantIdsRequest.js → search/client/requests/QnASearchRequest.js} +0 -0
- package/dist/api/resources/search/client/requests/index.d.ts +2 -2
- package/dist/api/resources/search/client/requests/index.js +0 -0
- package/dist/api/resources/search/index.d.ts +0 -0
- package/dist/api/resources/search/index.js +0 -0
- package/dist/api/resources/sources/client/Client.d.ts +11 -61
- package/dist/api/resources/sources/client/Client.js +14 -191
- package/dist/api/resources/sources/client/index.d.ts +0 -0
- package/dist/api/resources/sources/client/index.js +0 -0
- package/dist/api/resources/sources/client/requests/SourceDeleteRequest.d.ts +17 -0
- package/dist/api/resources/{upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.js → sources/client/requests/SourceDeleteRequest.js} +0 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +1 -3
- package/dist/api/resources/sources/client/requests/index.js +0 -0
- package/dist/api/resources/sources/index.d.ts +0 -0
- package/dist/api/resources/sources/index.js +0 -0
- package/dist/api/resources/tenant/client/Client.d.ts +54 -38
- package/dist/api/resources/tenant/client/Client.js +67 -114
- package/dist/api/resources/tenant/client/index.d.ts +0 -0
- package/dist/api/resources/tenant/client/index.js +0 -0
- package/dist/api/resources/tenant/client/requests/TenantCreateRequest.d.ts +20 -0
- package/dist/api/resources/{upload/client/requests/BodyBatchUploadUploadBatchUploadPost.js → tenant/client/requests/TenantCreateRequest.js} +0 -0
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +1 -4
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.js +0 -0
- package/dist/api/resources/tenant/client/requests/index.d.ts +1 -2
- package/dist/api/resources/tenant/client/requests/index.js +0 -0
- package/dist/api/resources/tenant/index.d.ts +0 -0
- package/dist/api/resources/tenant/index.js +0 -0
- package/dist/api/resources/upload/client/Client.d.ts +54 -428
- package/dist/api/resources/upload/client/Client.js +97 -1417
- package/dist/api/resources/upload/client/index.d.ts +0 -0
- package/dist/api/resources/upload/client/index.js +0 -0
- package/dist/api/resources/upload/client/requests/{UploadUploadMarkdownRequest.d.ts → BodyAddMemoryMemoriesAddMemoryPost.d.ts} +7 -7
- package/dist/api/resources/upload/client/requests/{BodyUpdateFileUploadUpdateDocumentPatch.js → BodyAddMemoryMemoriesAddMemoryPost.js} +0 -0
- package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +31 -0
- package/dist/api/resources/upload/client/requests/{BodyUploadFilesUploadUploadDocumentPost.js → BodyUploadAppIngestionUploadAppPost.js} +0 -0
- package/dist/api/resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.d.ts +22 -0
- package/dist/api/resources/upload/client/requests/{EmbeddingsUpdateRequest.js → BodyUploadDocumentIngestionUploadDocumentPost.js} +0 -0
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +18 -0
- package/dist/api/resources/upload/client/requests/{EmbeddingsUploadRequest.js → UploadDeleteMemoryRequest.js} +0 -0
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +1 -2
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.js +0 -0
- package/dist/api/resources/upload/client/requests/index.d.ts +4 -16
- package/dist/api/resources/upload/client/requests/index.js +0 -0
- package/dist/api/resources/upload/index.d.ts +0 -0
- package/dist/api/resources/upload/index.js +0 -0
- package/dist/api/types/ActualErrorResponse.d.ts +0 -0
- package/dist/api/types/ActualErrorResponse.js +0 -0
- package/dist/api/types/AddMemoryResponse.d.ts +17 -0
- package/dist/api/{resources/upload/client/requests/UploadBatchScrapeWebpageRequest.js → types/AddMemoryResponse.js} +0 -0
- package/dist/api/types/ApiKeyInfo.d.ts +17 -0
- package/dist/api/{resources/upload/client/requests/UploadBatchUploadMarkdownRequest.js → types/ApiKeyInfo.js} +0 -0
- package/dist/api/types/AppSourcesUploadData.d.ts +10 -4
- package/dist/api/types/AppSourcesUploadData.js +0 -0
- package/dist/api/types/AttachmentModel.d.ts +0 -0
- package/dist/api/types/AttachmentModel.js +0 -0
- package/dist/api/types/Bm25OperatorType.d.ts +0 -0
- package/dist/api/types/Bm25OperatorType.js +0 -0
- package/dist/api/types/CollectionStats.d.ts +9 -0
- package/dist/api/{resources/upload/client/requests/UploadBatchUploadTextRequest.js → types/CollectionStats.js} +0 -0
- package/dist/api/types/ContentModel.d.ts +0 -0
- package/dist/api/types/ContentModel.js +0 -0
- package/dist/api/types/CustomPropertyDefinition.d.ts +38 -0
- package/dist/api/{resources/upload/client/requests/UploadScrapeWebpageRequest.js → types/CustomPropertyDefinition.js} +0 -0
- package/dist/api/types/DashboardApisResponse.d.ts +12 -0
- package/dist/api/{resources/upload/client/requests/UploadUpdateMarkdownRequest.js → types/DashboardApisResponse.js} +0 -0
- package/dist/api/types/DashboardSourcesResponse.d.ts +12 -0
- package/dist/api/{resources/upload/client/requests/UploadUpdateTextRequest.js → types/DashboardSourcesResponse.js} +0 -0
- package/dist/api/types/DashboardTenantsResponse.d.ts +12 -0
- package/dist/api/{resources/upload/client/requests/UploadUpdateWebpageRequest.js → types/DashboardTenantsResponse.js} +0 -0
- package/dist/api/types/DeleteResult.d.ts +14 -0
- package/dist/api/{resources/upload/client/requests/UploadUploadAppSourcesRequest.js → types/DeleteResult.js} +0 -0
- package/dist/api/types/DeleteUserMemoryResponse.d.ts +1 -1
- package/dist/api/types/DeleteUserMemoryResponse.js +0 -0
- package/dist/api/types/Entity.d.ts +2 -2
- package/dist/api/types/Entity.js +0 -0
- package/dist/api/types/ErrorResponse.d.ts +0 -0
- package/dist/api/types/ErrorResponse.js +0 -0
- package/dist/api/types/FetchMode.d.ts +12 -0
- package/dist/api/types/FetchMode.js +11 -0
- package/dist/api/types/ForcefulRelationsPayload.d.ts +9 -0
- package/dist/api/{resources/upload/client/requests/UploadUploadMarkdownRequest.js → types/ForcefulRelationsPayload.js} +0 -0
- package/dist/api/types/GraphContext.d.ts +12 -0
- package/dist/api/{resources/upload/client/requests/UploadUploadTextRequest.js → types/GraphContext.js} +0 -0
- package/dist/api/types/HttpValidationError.d.ts +0 -0
- package/dist/api/types/HttpValidationError.js +0 -0
- package/dist/api/types/Infra.d.ts +8 -0
- package/dist/api/{resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.js → types/Infra.js} +0 -0
- package/dist/api/types/InsertResult.d.ts +16 -0
- package/dist/api/{resources/userMemory/client/requests/AddUserMemoryRequest.js → types/InsertResult.js} +0 -0
- package/dist/api/types/MemoryItem.d.ts +43 -0
- package/dist/api/{resources/userMemory/client/requests/RetrieveUserMemoryRequest.js → types/MemoryItem.js} +0 -0
- package/dist/api/types/MemoryResultItem.d.ts +19 -0
- package/dist/api/{resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.js → types/MemoryResultItem.js} +0 -0
- package/dist/api/types/MilvusDataType.d.ts +21 -0
- package/dist/api/types/MilvusDataType.js +20 -0
- package/dist/api/types/PathTriplet.d.ts +1 -7
- package/dist/api/types/PathTriplet.js +0 -0
- package/dist/api/types/ProcessingStatus.d.ts +16 -2
- package/dist/api/types/ProcessingStatus.js +12 -0
- package/dist/api/types/QnASearchResponse.d.ts +20 -0
- package/dist/api/{resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.js → types/QnASearchResponse.js} +0 -0
- package/dist/api/types/RawEmbeddingDocument.d.ts +15 -0
- package/dist/api/types/{AddUserMemoryResponse.js → RawEmbeddingDocument.js} +0 -0
- package/dist/api/types/RawEmbeddingSearchResult.d.ts +19 -0
- package/dist/api/types/{BatchUploadData.js → RawEmbeddingSearchResult.js} +0 -0
- package/dist/api/types/RawEmbeddingVector.d.ts +12 -0
- package/dist/api/types/{BodyScrapeWebpageUploadScrapeWebpagePost.js → RawEmbeddingVector.js} +0 -0
- package/dist/api/types/RelationEvidence.d.ts +13 -4
- package/dist/api/types/RelationEvidence.js +0 -0
- package/dist/api/types/RetrievalResult.d.ts +13 -0
- package/dist/api/types/{BodyUpdateScrapeJobUploadUpdateWebpagePatch.js → RetrievalResult.js} +0 -0
- package/dist/api/types/RetrieveMode.d.ts +0 -0
- package/dist/api/types/RetrieveMode.js +0 -0
- package/dist/api/types/ScoredPathResponse.d.ts +4 -11
- package/dist/api/types/ScoredPathResponse.js +0 -0
- package/dist/api/types/SearchMode.d.ts +11 -0
- package/dist/api/types/SearchMode.js +10 -0
- package/dist/api/types/SourceDeleteResponse.d.ts +14 -0
- package/dist/api/types/{ChunkGraphRelationsResponse.js → SourceDeleteResponse.js} +0 -0
- package/dist/api/types/SourceDeleteResultItem.d.ts +14 -0
- package/dist/api/types/{DeleteMemoryRequest.js → SourceDeleteResultItem.js} +0 -0
- package/dist/api/types/SourceFetchResponse.d.ts +26 -0
- package/dist/api/types/{DeleteSources.js → SourceFetchResponse.js} +0 -0
- package/dist/api/types/{GraphRelationsResponse.d.ts → SourceGraphRelationsResponse.d.ts} +2 -2
- package/dist/api/types/{DeleteSubTenantData.js → SourceGraphRelationsResponse.js} +0 -0
- package/dist/api/types/SourceListResponse.d.ts +11 -0
- package/dist/api/types/{EmbeddingsCreateCollectionData.js → SourceListResponse.js} +0 -0
- package/dist/api/types/SourceModel.d.ts +5 -1
- package/dist/api/types/SourceModel.js +0 -0
- package/dist/api/types/SourceStatus.d.ts +10 -0
- package/dist/api/types/SourceStatus.js +12 -0
- package/dist/api/types/SourceUploadResponse.d.ts +14 -0
- package/dist/api/types/{EmbeddingsDeleteData.js → SourceUploadResponse.js} +0 -0
- package/dist/api/types/SourceUploadResultItem.d.ts +14 -0
- package/dist/api/types/{EmbeddingsGetData.js → SourceUploadResultItem.js} +0 -0
- package/dist/api/types/SupportedLlmProviders.d.ts +11 -0
- package/dist/api/types/SupportedLlmProviders.js +13 -0
- package/dist/api/types/TenantCreateResponse.d.ts +14 -0
- package/dist/api/types/{EmbeddingsSearchData.js → TenantCreateResponse.js} +0 -0
- package/dist/api/types/TenantInfo.d.ts +11 -0
- package/dist/api/types/{ExtendedContext.js → TenantInfo.js} +0 -0
- package/dist/api/types/TenantMetadataSchemaInfo.d.ts +14 -0
- package/dist/api/types/{FetchContentData.js → TenantMetadataSchemaInfo.js} +0 -0
- package/dist/api/types/TenantStatsResponse.d.ts +14 -0
- package/dist/api/types/{FileUploadResult.js → TenantStatsResponse.js} +0 -0
- package/dist/api/types/{TripleWithEvidence.d.ts → TripletWithEvidence.d.ts} +4 -1
- package/dist/api/types/{GraphRelationsResponse.js → TripletWithEvidence.js} +0 -0
- package/dist/api/types/UserAssistantPair.d.ts +3 -0
- package/dist/api/types/UserAssistantPair.js +0 -0
- package/dist/api/types/ValidationError.d.ts +0 -0
- package/dist/api/types/ValidationError.js +0 -0
- package/dist/api/types/{SearchChunk.d.ts → VectorStoreChunk.d.ts} +5 -8
- package/dist/api/types/{ListSourcesResponse.js → VectorStoreChunk.js} +0 -0
- package/dist/api/types/index.d.ts +37 -33
- package/dist/api/types/index.js +37 -33
- package/dist/core/auth/AuthProvider.d.ts +0 -0
- package/dist/core/auth/AuthProvider.js +0 -0
- package/dist/core/auth/AuthRequest.d.ts +0 -0
- package/dist/core/auth/AuthRequest.js +0 -0
- package/dist/core/auth/BasicAuth.d.ts +0 -0
- package/dist/core/auth/BasicAuth.js +0 -0
- package/dist/core/auth/BearerToken.d.ts +0 -0
- package/dist/core/auth/BearerToken.js +0 -0
- package/dist/core/auth/index.d.ts +0 -0
- package/dist/core/auth/index.js +0 -0
- package/dist/core/base64.d.ts +0 -0
- package/dist/core/base64.js +0 -0
- package/dist/core/exports.d.ts +0 -0
- package/dist/core/exports.js +0 -0
- package/dist/core/fetcher/APIResponse.d.ts +0 -0
- package/dist/core/fetcher/APIResponse.js +0 -0
- package/dist/core/fetcher/BinaryResponse.d.ts +0 -0
- package/dist/core/fetcher/BinaryResponse.js +0 -0
- package/dist/core/fetcher/Fetcher.d.ts +0 -0
- package/dist/core/fetcher/Fetcher.js +0 -0
- package/dist/core/fetcher/Headers.d.ts +0 -0
- package/dist/core/fetcher/Headers.js +0 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +0 -0
- package/dist/core/fetcher/HttpResponsePromise.js +0 -0
- package/dist/core/fetcher/RawResponse.d.ts +0 -0
- package/dist/core/fetcher/RawResponse.js +0 -0
- package/dist/core/fetcher/ResponseWithBody.d.ts +0 -0
- package/dist/core/fetcher/ResponseWithBody.js +0 -0
- package/dist/core/fetcher/Supplier.d.ts +0 -0
- package/dist/core/fetcher/Supplier.js +0 -0
- package/dist/core/fetcher/createRequestUrl.d.ts +0 -0
- package/dist/core/fetcher/createRequestUrl.js +0 -0
- package/dist/core/fetcher/getErrorResponseBody.d.ts +0 -0
- package/dist/core/fetcher/getErrorResponseBody.js +0 -0
- package/dist/core/fetcher/getFetchFn.d.ts +0 -0
- package/dist/core/fetcher/getFetchFn.js +0 -0
- package/dist/core/fetcher/getHeader.d.ts +0 -0
- package/dist/core/fetcher/getHeader.js +0 -0
- package/dist/core/fetcher/getRequestBody.d.ts +0 -0
- package/dist/core/fetcher/getRequestBody.js +0 -0
- package/dist/core/fetcher/getResponseBody.d.ts +0 -0
- package/dist/core/fetcher/getResponseBody.js +0 -0
- package/dist/core/fetcher/index.d.ts +0 -0
- package/dist/core/fetcher/index.js +0 -0
- package/dist/core/fetcher/makeRequest.d.ts +0 -0
- package/dist/core/fetcher/makeRequest.js +0 -0
- package/dist/core/fetcher/requestWithRetries.d.ts +0 -0
- package/dist/core/fetcher/requestWithRetries.js +0 -0
- package/dist/core/fetcher/signals.d.ts +0 -0
- package/dist/core/fetcher/signals.js +0 -0
- package/dist/core/file/exports.d.ts +0 -0
- package/dist/core/file/exports.js +0 -0
- package/dist/core/file/file.d.ts +0 -0
- package/dist/core/file/file.js +0 -0
- package/dist/core/file/index.d.ts +0 -0
- package/dist/core/file/index.js +0 -0
- package/dist/core/file/types.d.ts +0 -0
- package/dist/core/file/types.js +0 -0
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +0 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +0 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.d.ts +0 -0
- package/dist/core/form-data-utils/encodeAsFormParameter.js +0 -0
- package/dist/core/form-data-utils/index.d.ts +0 -0
- package/dist/core/form-data-utils/index.js +0 -0
- package/dist/core/headers.d.ts +0 -0
- package/dist/core/headers.js +0 -0
- package/dist/core/index.d.ts +0 -0
- package/dist/core/index.js +0 -0
- package/dist/core/json.d.ts +0 -0
- package/dist/core/json.js +0 -0
- package/dist/core/runtime/index.d.ts +0 -0
- package/dist/core/runtime/index.js +0 -0
- package/dist/core/runtime/runtime.d.ts +0 -0
- package/dist/core/runtime/runtime.js +0 -0
- package/dist/core/url/index.d.ts +0 -0
- package/dist/core/url/index.js +0 -0
- package/dist/core/url/join.d.ts +0 -0
- package/dist/core/url/join.js +0 -0
- package/dist/core/url/qs.d.ts +0 -0
- package/dist/core/url/qs.js +0 -0
- package/dist/environments.d.ts +0 -0
- package/dist/environments.js +0 -0
- package/dist/errors/CortexAIError.d.ts +0 -0
- package/dist/errors/CortexAIError.js +0 -0
- package/dist/errors/CortexAITimeoutError.d.ts +0 -0
- package/dist/errors/CortexAITimeoutError.js +0 -0
- package/dist/errors/index.d.ts +0 -0
- package/dist/errors/index.js +0 -0
- package/dist/exports.d.ts +0 -0
- package/dist/exports.js +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +0 -0
- package/package.json +31 -34
- package/dist/api/resources/document/client/Client.d.ts +0 -59
- package/dist/api/resources/document/client/Client.js +0 -132
- package/dist/api/resources/document/client/index.d.ts +0 -1
- package/dist/api/resources/embeddings/client/requests/EmbeddingsCreateCollectionRequest.d.ts +0 -13
- package/dist/api/resources/embeddings/client/requests/EmbeddingsSearchRequest.d.ts +0 -18
- package/dist/api/resources/embeddings/client/requests/GetEmbeddingsBasedOnChunkIdsRequest.d.ts +0 -18
- package/dist/api/resources/fetch/client/requests/FetchContentRequest.d.ts +0 -18
- package/dist/api/resources/search/client/requests/QnARequest.d.ts +0 -47
- package/dist/api/resources/sources/client/requests/SourceBodyParams.d.ts +0 -18
- package/dist/api/resources/tenant/client/requests/TenantDeleteSubTenantRequest.d.ts +0 -14
- package/dist/api/resources/tenant/client/requests/TenantGetSubTenantIdsRequest.d.ts +0 -12
- package/dist/api/resources/upload/client/requests/BodyBatchUpdateUploadBatchUpdatePatch.d.ts +0 -37
- package/dist/api/resources/upload/client/requests/BodyBatchUploadUploadBatchUploadPost.d.ts +0 -37
- package/dist/api/resources/upload/client/requests/BodyUpdateFileUploadUpdateDocumentPatch.d.ts +0 -38
- package/dist/api/resources/upload/client/requests/BodyUploadFilesUploadUploadDocumentPost.d.ts +0 -37
- package/dist/api/resources/upload/client/requests/EmbeddingsUpdateRequest.d.ts +0 -18
- package/dist/api/resources/upload/client/requests/EmbeddingsUploadRequest.d.ts +0 -21
- package/dist/api/resources/upload/client/requests/UploadBatchScrapeWebpageRequest.d.ts +0 -22
- package/dist/api/resources/upload/client/requests/UploadBatchUploadMarkdownRequest.d.ts +0 -22
- package/dist/api/resources/upload/client/requests/UploadBatchUploadTextRequest.d.ts +0 -22
- package/dist/api/resources/upload/client/requests/UploadScrapeWebpageRequest.d.ts +0 -25
- package/dist/api/resources/upload/client/requests/UploadUpdateMarkdownRequest.d.ts +0 -24
- package/dist/api/resources/upload/client/requests/UploadUpdateWebpageRequest.d.ts +0 -25
- package/dist/api/resources/upload/client/requests/UploadUploadAppSourcesRequest.d.ts +0 -20
- package/dist/api/resources/upload/client/requests/UploadUploadTextRequest.d.ts +0 -21
- package/dist/api/resources/user/client/Client.d.ts +0 -60
- package/dist/api/resources/user/client/Client.js +0 -152
- package/dist/api/resources/user/client/requests/BodyCreateTenantUserCreateTenantPost.d.ts +0 -15
- package/dist/api/resources/user/client/requests/index.d.ts +0 -1
- package/dist/api/resources/user/client/requests/index.js +0 -2
- package/dist/api/resources/user/index.d.ts +0 -1
- package/dist/api/resources/user/index.js +0 -17
- package/dist/api/resources/userMemory/client/Client.d.ts +0 -150
- package/dist/api/resources/userMemory/client/index.d.ts +0 -2
- package/dist/api/resources/userMemory/client/index.js +0 -17
- package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +0 -27
- package/dist/api/resources/userMemory/client/requests/RetrieveUserMemoryRequest.d.ts +0 -24
- package/dist/api/resources/userMemory/client/requests/UserMemoryDeleteUserMemoryRequest.d.ts +0 -19
- package/dist/api/resources/userMemory/client/requests/UserMemoryListUserMemoriesRequest.d.ts +0 -16
- package/dist/api/resources/userMemory/client/requests/index.d.ts +0 -4
- package/dist/api/resources/userMemory/client/requests/index.js +0 -2
- package/dist/api/resources/userMemory/index.d.ts +0 -1
- package/dist/api/resources/userMemory/index.js +0 -17
- package/dist/api/types/AddUserMemoryResponse.d.ts +0 -16
- package/dist/api/types/BatchUploadData.d.ts +0 -11
- package/dist/api/types/BodyScrapeWebpageUploadScrapeWebpagePost.d.ts +0 -5
- package/dist/api/types/BodyUpdateScrapeJobUploadUpdateWebpagePatch.d.ts +0 -5
- package/dist/api/types/ChunkGraphRelationsResponse.d.ts +0 -13
- package/dist/api/types/DeleteMemoryRequest.d.ts +0 -11
- package/dist/api/types/DeleteSources.d.ts +0 -7
- package/dist/api/types/DeleteSubTenantData.d.ts +0 -15
- package/dist/api/types/EmbeddingsCreateCollectionData.d.ts +0 -13
- package/dist/api/types/EmbeddingsDeleteData.d.ts +0 -13
- package/dist/api/types/EmbeddingsGetData.d.ts +0 -13
- package/dist/api/types/EmbeddingsSearchData.d.ts +0 -13
- package/dist/api/types/ExtendedContext.d.ts +0 -5
- package/dist/api/types/FetchContentData.d.ts +0 -13
- package/dist/api/types/FileUploadResult.d.ts +0 -9
- package/dist/api/types/ListSourcesResponse.d.ts +0 -12
- package/dist/api/types/ListUserMemoriesResponse.d.ts +0 -13
- package/dist/api/types/ListUserMemoriesResponse.js +0 -5
- package/dist/api/types/MarkdownUploadRequest.d.ts +0 -22
- package/dist/api/types/MarkdownUploadRequest.js +0 -5
- package/dist/api/types/RelatedChunk.d.ts +0 -9
- package/dist/api/types/RelatedChunk.js +0 -5
- package/dist/api/types/Relations.d.ts +0 -9
- package/dist/api/types/Relations.js +0 -5
- package/dist/api/types/RetrieveResponse.d.ts +0 -12
- package/dist/api/types/RetrieveResponse.js +0 -5
- package/dist/api/types/RetrieveUserMemoryResponse.d.ts +0 -15
- package/dist/api/types/RetrieveUserMemoryResponse.js +0 -5
- package/dist/api/types/ScoredTripletResponse.d.ts +0 -17
- package/dist/api/types/ScoredTripletResponse.js +0 -5
- package/dist/api/types/SearchChunk.js +0 -5
- package/dist/api/types/SingleUploadData.d.ts +0 -10
- package/dist/api/types/SingleUploadData.js +0 -5
- package/dist/api/types/Source.d.ts +0 -19
- package/dist/api/types/Source.js +0 -5
- package/dist/api/types/SubTenantIdsData.d.ts +0 -17
- package/dist/api/types/SubTenantIdsData.js +0 -5
- package/dist/api/types/TenantCreateData.d.ts +0 -13
- package/dist/api/types/TenantCreateData.js +0 -5
- package/dist/api/types/TenantStats.d.ts +0 -15
- package/dist/api/types/TenantStats.js +0 -5
- package/dist/api/types/TripleWithEvidence.js +0 -5
- package/dist/api/types/UserMemory.d.ts +0 -12
- package/dist/api/types/UserMemory.js +0 -5
- package/dist/api/types/WebpageScrapeRequest.d.ts +0 -9
- package/dist/api/types/WebpageScrapeRequest.js +0 -5
package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* tenant_id: "tenant_id",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_id"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface ListSourcesDashboardSourcesGetRequest {
|
|
12
|
+
/** Tenant ID */
|
|
13
|
+
tenant_id: string;
|
|
14
|
+
/** Sub-tenant ID */
|
|
15
|
+
sub_tenant_id: string;
|
|
16
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -30,11 +30,17 @@ export declare class Embeddings {
|
|
|
30
30
|
protected readonly _options: Embeddings.Options;
|
|
31
31
|
constructor(_options?: Embeddings.Options);
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Upload pre-computed embeddings for advanced similarity search.
|
|
34
34
|
*
|
|
35
|
-
*
|
|
35
|
+
* This endpoint accepts vector embeddings that you’ve generated externally,
|
|
36
|
+
* allowing you to integrate with custom embedding models or existing vector databases.
|
|
37
|
+
* The embeddings represent chunks of your content as numerical vectors.
|
|
36
38
|
*
|
|
37
|
-
*
|
|
39
|
+
* The system stores these embeddings and makes them available for semantic search and similarity matching.
|
|
40
|
+
* Use this when you want to leverage specialized embedding models or have existing vector representations.
|
|
41
|
+
* When upsert=True, existing embeddings with the same chunk_id will be updated.
|
|
42
|
+
*
|
|
43
|
+
* @param {CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost} request
|
|
38
44
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
45
|
*
|
|
40
46
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -46,23 +52,28 @@ export declare class Embeddings {
|
|
|
46
52
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
47
53
|
*
|
|
48
54
|
* @example
|
|
49
|
-
* await client.embeddings.
|
|
50
|
-
*
|
|
51
|
-
*
|
|
55
|
+
* await client.embeddings.insert({
|
|
56
|
+
* tenant_id: "tenant_id",
|
|
57
|
+
* embeddings: [{
|
|
58
|
+
* source_id: "source_id",
|
|
59
|
+
* embeddings: [{
|
|
60
|
+
* chunk_id: "chunk_id",
|
|
61
|
+
* embedding: [1.1]
|
|
62
|
+
* }]
|
|
63
|
+
* }]
|
|
52
64
|
* })
|
|
53
65
|
*/
|
|
54
|
-
|
|
55
|
-
private
|
|
66
|
+
insert(request: CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.InsertResult>;
|
|
67
|
+
private __insert;
|
|
56
68
|
/**
|
|
57
69
|
* Find similar chunks using an embedding vector.
|
|
58
70
|
*
|
|
59
71
|
* Use this to retrieve the most similar chunk IDs to a single query embedding.
|
|
60
72
|
*
|
|
61
|
-
*
|
|
62
|
-
* Expected outcome
|
|
73
|
+
* Expected outcome:
|
|
63
74
|
* - You receive the closest chunk IDs with optional similarity scores.
|
|
64
75
|
*
|
|
65
|
-
* @param {CortexAI.
|
|
76
|
+
* @param {CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost} request
|
|
66
77
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
78
|
*
|
|
68
79
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -75,17 +86,18 @@ export declare class Embeddings {
|
|
|
75
86
|
*
|
|
76
87
|
* @example
|
|
77
88
|
* await client.embeddings.search({
|
|
78
|
-
* tenant_id: "
|
|
89
|
+
* tenant_id: "tenant_id",
|
|
90
|
+
* sub_tenant_id: "sub_tenant_id",
|
|
91
|
+
* query_embedding: [1.1]
|
|
79
92
|
* })
|
|
80
93
|
*/
|
|
81
|
-
search(request: CortexAI.
|
|
94
|
+
search(request: CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
|
|
82
95
|
private __search;
|
|
83
96
|
/**
|
|
84
97
|
* Retrieve embeddings for specific chunk IDs.
|
|
85
|
-
*
|
|
86
98
|
* Use this when you already know the chunk IDs and need their corresponding embeddings.
|
|
87
99
|
*
|
|
88
|
-
* @param {CortexAI.
|
|
100
|
+
* @param {CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost} request
|
|
89
101
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
90
102
|
*
|
|
91
103
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -97,19 +109,20 @@ export declare class Embeddings {
|
|
|
97
109
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
98
110
|
*
|
|
99
111
|
* @example
|
|
100
|
-
* await client.embeddings.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
112
|
+
* await client.embeddings.filter({
|
|
113
|
+
* tenant_id: "tenant_id",
|
|
114
|
+
* sub_tenant_id: "sub_tenant_id"
|
|
103
115
|
* })
|
|
104
116
|
*/
|
|
105
|
-
|
|
106
|
-
private
|
|
117
|
+
filter(request: CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
|
|
118
|
+
private __filter;
|
|
107
119
|
/**
|
|
108
|
-
*
|
|
120
|
+
* Delete embedding chunks by chunk ID.
|
|
109
121
|
*
|
|
110
|
-
* Use this to
|
|
122
|
+
* Use this to remove specific chunks from your embeddings index when they are no longer
|
|
123
|
+
* valid or should not appear in results.
|
|
111
124
|
*
|
|
112
|
-
* @param {CortexAI.
|
|
125
|
+
* @param {CortexAI.EmbeddingsDeleteRequest} request
|
|
113
126
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
127
|
*
|
|
115
128
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -121,11 +134,11 @@ export declare class Embeddings {
|
|
|
121
134
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
122
135
|
*
|
|
123
136
|
* @example
|
|
124
|
-
* await client.embeddings.
|
|
125
|
-
* tenant_id: "
|
|
137
|
+
* await client.embeddings.delete({
|
|
138
|
+
* tenant_id: "tenant_id"
|
|
126
139
|
* })
|
|
127
140
|
*/
|
|
128
|
-
|
|
129
|
-
private
|
|
141
|
+
delete(request: CortexAI.EmbeddingsDeleteRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.DeleteResult>;
|
|
142
|
+
private __delete;
|
|
130
143
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
131
144
|
}
|
|
@@ -37,11 +37,17 @@ class Embeddings {
|
|
|
37
37
|
this._options = _options;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Upload pre-computed embeddings for advanced similarity search.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
42
|
+
* This endpoint accepts vector embeddings that you’ve generated externally,
|
|
43
|
+
* allowing you to integrate with custom embedding models or existing vector databases.
|
|
44
|
+
* The embeddings represent chunks of your content as numerical vectors.
|
|
43
45
|
*
|
|
44
|
-
*
|
|
46
|
+
* The system stores these embeddings and makes them available for semantic search and similarity matching.
|
|
47
|
+
* Use this when you want to leverage specialized embedding models or have existing vector representations.
|
|
48
|
+
* When upsert=True, existing embeddings with the same chunk_id will be updated.
|
|
49
|
+
*
|
|
50
|
+
* @param {CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost} request
|
|
45
51
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
52
|
*
|
|
47
53
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -53,20 +59,26 @@ class Embeddings {
|
|
|
53
59
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
54
60
|
*
|
|
55
61
|
* @example
|
|
56
|
-
* await client.embeddings.
|
|
57
|
-
*
|
|
58
|
-
*
|
|
62
|
+
* await client.embeddings.insert({
|
|
63
|
+
* tenant_id: "tenant_id",
|
|
64
|
+
* embeddings: [{
|
|
65
|
+
* source_id: "source_id",
|
|
66
|
+
* embeddings: [{
|
|
67
|
+
* chunk_id: "chunk_id",
|
|
68
|
+
* embedding: [1.1]
|
|
69
|
+
* }]
|
|
70
|
+
* }]
|
|
59
71
|
* })
|
|
60
72
|
*/
|
|
61
|
-
|
|
62
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
73
|
+
insert(request, requestOptions) {
|
|
74
|
+
return core.HttpResponsePromise.fromPromise(this.__insert(request, requestOptions));
|
|
63
75
|
}
|
|
64
|
-
async
|
|
76
|
+
async __insert(request, requestOptions) {
|
|
65
77
|
var _a, _b, _c;
|
|
66
78
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
67
79
|
const _response = await core.fetcher({
|
|
68
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/
|
|
69
|
-
method: "
|
|
80
|
+
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/insert-raw-embeddings"),
|
|
81
|
+
method: "POST",
|
|
70
82
|
headers: _headers,
|
|
71
83
|
contentType: "application/json",
|
|
72
84
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -111,7 +123,7 @@ class Embeddings {
|
|
|
111
123
|
rawResponse: _response.rawResponse,
|
|
112
124
|
});
|
|
113
125
|
case "timeout":
|
|
114
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling
|
|
126
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/insert-raw-embeddings.");
|
|
115
127
|
case "unknown":
|
|
116
128
|
throw new errors.CortexAIError({
|
|
117
129
|
message: _response.error.errorMessage,
|
|
@@ -124,11 +136,10 @@ class Embeddings {
|
|
|
124
136
|
*
|
|
125
137
|
* Use this to retrieve the most similar chunk IDs to a single query embedding.
|
|
126
138
|
*
|
|
127
|
-
*
|
|
128
|
-
* Expected outcome
|
|
139
|
+
* Expected outcome:
|
|
129
140
|
* - You receive the closest chunk IDs with optional similarity scores.
|
|
130
141
|
*
|
|
131
|
-
* @param {CortexAI.
|
|
142
|
+
* @param {CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost} request
|
|
132
143
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
133
144
|
*
|
|
134
145
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -141,7 +152,9 @@ class Embeddings {
|
|
|
141
152
|
*
|
|
142
153
|
* @example
|
|
143
154
|
* await client.embeddings.search({
|
|
144
|
-
* tenant_id: "
|
|
155
|
+
* tenant_id: "tenant_id",
|
|
156
|
+
* sub_tenant_id: "sub_tenant_id",
|
|
157
|
+
* query_embedding: [1.1]
|
|
145
158
|
* })
|
|
146
159
|
*/
|
|
147
160
|
search(request, requestOptions) {
|
|
@@ -151,7 +164,7 @@ class Embeddings {
|
|
|
151
164
|
var _a, _b, _c;
|
|
152
165
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
153
166
|
const _response = await core.fetcher({
|
|
154
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/search"),
|
|
167
|
+
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/search-raw-embeddings"),
|
|
155
168
|
method: "POST",
|
|
156
169
|
headers: _headers,
|
|
157
170
|
contentType: "application/json",
|
|
@@ -197,7 +210,7 @@ class Embeddings {
|
|
|
197
210
|
rawResponse: _response.rawResponse,
|
|
198
211
|
});
|
|
199
212
|
case "timeout":
|
|
200
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/search.");
|
|
213
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/search-raw-embeddings.");
|
|
201
214
|
case "unknown":
|
|
202
215
|
throw new errors.CortexAIError({
|
|
203
216
|
message: _response.error.errorMessage,
|
|
@@ -207,10 +220,9 @@ class Embeddings {
|
|
|
207
220
|
}
|
|
208
221
|
/**
|
|
209
222
|
* Retrieve embeddings for specific chunk IDs.
|
|
210
|
-
*
|
|
211
223
|
* Use this when you already know the chunk IDs and need their corresponding embeddings.
|
|
212
224
|
*
|
|
213
|
-
* @param {CortexAI.
|
|
225
|
+
* @param {CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost} request
|
|
214
226
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
227
|
*
|
|
216
228
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -222,19 +234,19 @@ class Embeddings {
|
|
|
222
234
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
223
235
|
*
|
|
224
236
|
* @example
|
|
225
|
-
* await client.embeddings.
|
|
226
|
-
*
|
|
227
|
-
*
|
|
237
|
+
* await client.embeddings.filter({
|
|
238
|
+
* tenant_id: "tenant_id",
|
|
239
|
+
* sub_tenant_id: "sub_tenant_id"
|
|
228
240
|
* })
|
|
229
241
|
*/
|
|
230
|
-
|
|
231
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
242
|
+
filter(request, requestOptions) {
|
|
243
|
+
return core.HttpResponsePromise.fromPromise(this.__filter(request, requestOptions));
|
|
232
244
|
}
|
|
233
|
-
async
|
|
245
|
+
async __filter(request, requestOptions) {
|
|
234
246
|
var _a, _b, _c;
|
|
235
247
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
236
248
|
const _response = await core.fetcher({
|
|
237
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/
|
|
249
|
+
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/filter-raw-embeddings"),
|
|
238
250
|
method: "POST",
|
|
239
251
|
headers: _headers,
|
|
240
252
|
contentType: "application/json",
|
|
@@ -280,7 +292,7 @@ class Embeddings {
|
|
|
280
292
|
rawResponse: _response.rawResponse,
|
|
281
293
|
});
|
|
282
294
|
case "timeout":
|
|
283
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/
|
|
295
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /embeddings/filter-raw-embeddings.");
|
|
284
296
|
case "unknown":
|
|
285
297
|
throw new errors.CortexAIError({
|
|
286
298
|
message: _response.error.errorMessage,
|
|
@@ -289,11 +301,12 @@ class Embeddings {
|
|
|
289
301
|
}
|
|
290
302
|
}
|
|
291
303
|
/**
|
|
292
|
-
*
|
|
304
|
+
* Delete embedding chunks by chunk ID.
|
|
293
305
|
*
|
|
294
|
-
* Use this to
|
|
306
|
+
* Use this to remove specific chunks from your embeddings index when they are no longer
|
|
307
|
+
* valid or should not appear in results.
|
|
295
308
|
*
|
|
296
|
-
* @param {CortexAI.
|
|
309
|
+
* @param {CortexAI.EmbeddingsDeleteRequest} request
|
|
297
310
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
298
311
|
*
|
|
299
312
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -305,22 +318,36 @@ class Embeddings {
|
|
|
305
318
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
306
319
|
*
|
|
307
320
|
* @example
|
|
308
|
-
* await client.embeddings.
|
|
309
|
-
* tenant_id: "
|
|
321
|
+
* await client.embeddings.delete({
|
|
322
|
+
* tenant_id: "tenant_id"
|
|
310
323
|
* })
|
|
311
324
|
*/
|
|
312
|
-
|
|
313
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
325
|
+
delete(request, requestOptions) {
|
|
326
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
|
|
314
327
|
}
|
|
315
|
-
async
|
|
328
|
+
async __delete(request, requestOptions) {
|
|
316
329
|
var _a, _b, _c;
|
|
317
|
-
const { tenant_id: tenantId } = request;
|
|
330
|
+
const { tenant_id: tenantId, sub_tenant_id: subTenantId, source_id: sourceId, chunk_ids: chunkIds } = request;
|
|
318
331
|
const _queryParams = {};
|
|
319
332
|
_queryParams["tenant_id"] = tenantId;
|
|
333
|
+
if (subTenantId != null) {
|
|
334
|
+
_queryParams["sub_tenant_id"] = subTenantId;
|
|
335
|
+
}
|
|
336
|
+
if (sourceId != null) {
|
|
337
|
+
_queryParams["source_id"] = sourceId;
|
|
338
|
+
}
|
|
339
|
+
if (chunkIds != null) {
|
|
340
|
+
if (Array.isArray(chunkIds)) {
|
|
341
|
+
_queryParams["chunk_ids"] = chunkIds.map((item) => item);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
_queryParams["chunk_ids"] = chunkIds;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
320
347
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
321
348
|
const _response = await core.fetcher({
|
|
322
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/
|
|
323
|
-
method: "
|
|
349
|
+
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "embeddings/delete-raw-embeddings"),
|
|
350
|
+
method: "DELETE",
|
|
324
351
|
headers: _headers,
|
|
325
352
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
326
353
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -328,10 +355,7 @@ class Embeddings {
|
|
|
328
355
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
329
356
|
});
|
|
330
357
|
if (_response.ok) {
|
|
331
|
-
return {
|
|
332
|
-
data: _response.body,
|
|
333
|
-
rawResponse: _response.rawResponse,
|
|
334
|
-
};
|
|
358
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
335
359
|
}
|
|
336
360
|
if (_response.error.reason === "status-code") {
|
|
337
361
|
switch (_response.error.statusCode) {
|
|
@@ -365,7 +389,7 @@ class Embeddings {
|
|
|
365
389
|
rawResponse: _response.rawResponse,
|
|
366
390
|
});
|
|
367
391
|
case "timeout":
|
|
368
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling
|
|
392
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling DELETE /embeddings/delete-raw-embeddings.");
|
|
369
393
|
case "unknown":
|
|
370
394
|
throw new errors.CortexAIError({
|
|
371
395
|
message: _response.error.errorMessage,
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* tenant_id: "tenant_id",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_id"
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost {
|
|
12
|
+
/** Unique identifier for the tenant/organization */
|
|
13
|
+
tenant_id: string;
|
|
14
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
15
|
+
sub_tenant_id: string;
|
|
16
|
+
/** Optional source ID to filter by (mutually exclusive with chunk_ids) */
|
|
17
|
+
source_id?: string;
|
|
18
|
+
/** Optional list of chunk IDs to filter by (mutually exclusive with source_id) */
|
|
19
|
+
chunk_ids?: string[];
|
|
20
|
+
/** Optional list of fields to return in results (default: chunk_id, source_id, metadata) */
|
|
21
|
+
output_fields?: string[];
|
|
22
|
+
/** Maximum number of results to return */
|
|
23
|
+
limit?: number;
|
|
24
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../../../../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* tenant_id: "tenant_id",
|
|
9
|
+
* embeddings: [{
|
|
10
|
+
* source_id: "source_id",
|
|
11
|
+
* embeddings: [{
|
|
12
|
+
* chunk_id: "chunk_id",
|
|
13
|
+
* embedding: [1.1]
|
|
14
|
+
* }]
|
|
15
|
+
* }]
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
export interface BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost {
|
|
19
|
+
/** Unique identifier for the tenant/organization */
|
|
20
|
+
tenant_id: string;
|
|
21
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
22
|
+
sub_tenant_id?: string;
|
|
23
|
+
/** List of raw embedding documents to insert */
|
|
24
|
+
embeddings: CortexAI.RawEmbeddingDocument[];
|
|
25
|
+
/** If True, update existing embeddings; if False, insert only */
|
|
26
|
+
upsert?: boolean;
|
|
27
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* tenant_id: "tenant_id",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_id",
|
|
9
|
+
* query_embedding: [1.1]
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost {
|
|
13
|
+
/** Unique identifier for the tenant/organization */
|
|
14
|
+
tenant_id: string;
|
|
15
|
+
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
16
|
+
sub_tenant_id: string;
|
|
17
|
+
/** Query embedding vector to search for */
|
|
18
|
+
query_embedding: number[];
|
|
19
|
+
/** Maximum number of results to return */
|
|
20
|
+
limit?: number;
|
|
21
|
+
/** Optional Milvus filter expression for additional filtering */
|
|
22
|
+
filter_expr?: string;
|
|
23
|
+
/** Optional list of fields to return in results (default: chunk_id, source_id, metadata) */
|
|
24
|
+
output_fields?: string[];
|
|
25
|
+
}
|
|
File without changes
|
|
@@ -4,15 +4,16 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
*
|
|
8
|
-
* tenant_id: "tenant_1234"
|
|
7
|
+
* tenant_id: "tenant_id"
|
|
9
8
|
* }
|
|
10
9
|
*/
|
|
11
10
|
export interface EmbeddingsDeleteRequest {
|
|
12
|
-
/** The chunk IDs of the source you want to delete */
|
|
13
|
-
chunk_ids: string[];
|
|
14
11
|
/** Unique identifier for the tenant/organization */
|
|
15
12
|
tenant_id: string;
|
|
16
|
-
/** Optional sub-tenant
|
|
13
|
+
/** Optional sub-tenant ID for scoping deletion */
|
|
17
14
|
sub_tenant_id?: string;
|
|
15
|
+
/** Optional source ID to delete by (mutually exclusive with chunk_ids) */
|
|
16
|
+
source_id?: string;
|
|
17
|
+
/** Optional list of chunk IDs to delete (mutually exclusive with source_id) */
|
|
18
|
+
chunk_ids?: string | string[];
|
|
18
19
|
}
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
export { type BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost } from "./BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js";
|
|
2
|
+
export { type BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost } from "./BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js";
|
|
3
|
+
export { type BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost } from "./BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js";
|
|
1
4
|
export { type EmbeddingsDeleteRequest } from "./EmbeddingsDeleteRequest.js";
|
|
2
|
-
export { type EmbeddingsSearchRequest } from "./EmbeddingsSearchRequest.js";
|
|
3
|
-
export { type GetEmbeddingsBasedOnChunkIdsRequest } from "./GetEmbeddingsBasedOnChunkIdsRequest.js";
|
|
4
|
-
export { type EmbeddingsCreateCollectionRequest } from "./EmbeddingsCreateCollectionRequest.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -30,7 +30,97 @@ export declare class Fetch {
|
|
|
30
30
|
protected readonly _options: Fetch.Options;
|
|
31
31
|
constructor(_options?: Fetch.Options);
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Retrieve all sources for a specific tenant and subtenant combination.
|
|
34
|
+
*
|
|
35
|
+
* Use this endpoint to fetch a complete list of all sources associated
|
|
36
|
+
* with your tenant. This includes documents, files, and other content
|
|
37
|
+
* you've uploaded for processing.
|
|
38
|
+
*
|
|
39
|
+
* You can optionally specify a sub-tenant to narrow down the results to
|
|
40
|
+
* sources within that specific sub-tenant scope.
|
|
41
|
+
*
|
|
42
|
+
* @param {CortexAI.FetchSourcesRequest} request
|
|
43
|
+
* @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link CortexAI.BadRequestError}
|
|
46
|
+
* @throws {@link CortexAI.UnauthorizedError}
|
|
47
|
+
* @throws {@link CortexAI.ForbiddenError}
|
|
48
|
+
* @throws {@link CortexAI.NotFoundError}
|
|
49
|
+
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
50
|
+
* @throws {@link CortexAI.InternalServerError}
|
|
51
|
+
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* await client.fetch.sources({
|
|
55
|
+
* tenant_id: "tenant_id"
|
|
56
|
+
* })
|
|
57
|
+
*/
|
|
58
|
+
sources(request: CortexAI.FetchSourcesRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceListResponse>;
|
|
59
|
+
private __sources;
|
|
60
|
+
/**
|
|
61
|
+
* Retrieve specific sources by their IDs.
|
|
62
|
+
*
|
|
63
|
+
* Use this endpoint to fetch one or more sources by providing their
|
|
64
|
+
* unique identifiers. This is useful when you need detailed information
|
|
65
|
+
* about specific documents or content you've previously uploaded.
|
|
66
|
+
*
|
|
67
|
+
* Provide the source IDs in the request body along with your tenant
|
|
68
|
+
* information to get the exact sources you need.
|
|
69
|
+
*
|
|
70
|
+
* @param {CortexAI.ListSourcesByIdRequest} request
|
|
71
|
+
* @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link CortexAI.BadRequestError}
|
|
74
|
+
* @throws {@link CortexAI.UnauthorizedError}
|
|
75
|
+
* @throws {@link CortexAI.ForbiddenError}
|
|
76
|
+
* @throws {@link CortexAI.NotFoundError}
|
|
77
|
+
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
78
|
+
* @throws {@link CortexAI.InternalServerError}
|
|
79
|
+
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* await client.fetch.sourceByIds({
|
|
83
|
+
* source_ids: ["source_ids"],
|
|
84
|
+
* tenant_id: "tenant_id"
|
|
85
|
+
* })
|
|
86
|
+
*/
|
|
87
|
+
sourceByIds(request: CortexAI.ListSourcesByIdRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceListResponse>;
|
|
88
|
+
private __sourceByIds;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieve relations for a specific source.
|
|
91
|
+
*
|
|
92
|
+
* Use this endpoint to fetch all relations associated with a specific source.
|
|
93
|
+
* This is useful when you need to understand the relationships between entities within a source.
|
|
94
|
+
*
|
|
95
|
+
* Provide the source ID in the request body along with your tenant information to get the relations for that source.
|
|
96
|
+
*
|
|
97
|
+
* @param {CortexAI.FetchGraphRelationsBySourceIdRequest} request
|
|
98
|
+
* @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link CortexAI.BadRequestError}
|
|
101
|
+
* @throws {@link CortexAI.UnauthorizedError}
|
|
102
|
+
* @throws {@link CortexAI.ForbiddenError}
|
|
103
|
+
* @throws {@link CortexAI.NotFoundError}
|
|
104
|
+
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
105
|
+
* @throws {@link CortexAI.InternalServerError}
|
|
106
|
+
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.fetch.graphRelationsBySourceId({
|
|
110
|
+
* source_id: "source_id"
|
|
111
|
+
* })
|
|
112
|
+
*/
|
|
113
|
+
graphRelationsBySourceId(request: CortexAI.FetchGraphRelationsBySourceIdRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceGraphRelationsResponse>;
|
|
114
|
+
private __graphRelationsBySourceId;
|
|
115
|
+
/**
|
|
116
|
+
* Fetch the content of a source ingested.
|
|
117
|
+
*
|
|
118
|
+
* This endpoint can return:
|
|
119
|
+
* - File content directly (as string or base64)
|
|
120
|
+
* - A presigned URL to access the file
|
|
121
|
+
* - Both content and presigned URL
|
|
122
|
+
*
|
|
123
|
+
* @param {CortexAI.SourceFetchRequest} request
|
|
34
124
|
* @param {Fetch.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
125
|
*
|
|
36
126
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -42,13 +132,12 @@ export declare class Fetch {
|
|
|
42
132
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
43
133
|
*
|
|
44
134
|
* @example
|
|
45
|
-
* await client.fetch.
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* tenant_id: "tenant_1234"
|
|
135
|
+
* await client.fetch.sourceContent({
|
|
136
|
+
* tenant_id: "tenant_id",
|
|
137
|
+
* source_id: "source_id"
|
|
49
138
|
* })
|
|
50
139
|
*/
|
|
51
|
-
|
|
52
|
-
private
|
|
140
|
+
sourceContent(request: CortexAI.SourceFetchRequest, requestOptions?: Fetch.RequestOptions): core.HttpResponsePromise<CortexAI.SourceFetchResponse>;
|
|
141
|
+
private __sourceContent;
|
|
53
142
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
54
143
|
}
|