@usecortex_ai/node 0.5.0 → 0.5.1
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 +0 -2
- package/dist/Client.js +0 -2
- package/dist/api/errors/BadRequestError.d.ts +0 -0
- package/dist/api/errors/BadRequestError.js +0 -0
- package/dist/api/errors/ForbiddenError.d.ts +0 -0
- package/dist/api/errors/ForbiddenError.js +0 -0
- package/dist/api/errors/InternalServerError.d.ts +0 -0
- package/dist/api/errors/InternalServerError.js +0 -0
- package/dist/api/errors/NotFoundError.d.ts +0 -0
- package/dist/api/errors/NotFoundError.js +0 -0
- package/dist/api/errors/ServiceUnavailableError.d.ts +0 -0
- package/dist/api/errors/ServiceUnavailableError.js +0 -0
- package/dist/api/errors/TooManyRequestsError.d.ts +0 -0
- package/dist/api/errors/TooManyRequestsError.js +0 -0
- package/dist/api/errors/UnauthorizedError.d.ts +0 -0
- 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 +0 -0
- package/dist/api/errors/index.js +0 -0
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1 -1
- package/dist/api/resources/dashboard/client/Client.d.ts +2 -16
- package/dist/api/resources/dashboard/client/Client.js +2 -16
- package/dist/api/resources/dashboard/client/index.d.ts +0 -0
- package/dist/api/resources/dashboard/client/index.js +0 -0
- package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.d.ts +0 -0
- package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.js +0 -0
- package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.d.ts +2 -2
- package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.js +0 -0
- package/dist/api/resources/dashboard/client/requests/index.d.ts +0 -0
- package/dist/api/resources/dashboard/client/requests/index.js +0 -0
- package/dist/api/resources/dashboard/index.d.ts +0 -0
- package/dist/api/resources/dashboard/index.js +0 -0
- package/dist/api/resources/embeddings/client/Client.d.ts +20 -33
- package/dist/api/resources/embeddings/client/Client.js +28 -41
- 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 +2 -2
- package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +15 -3
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +2 -2
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +1 -1
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.js +0 -0
- package/dist/api/resources/embeddings/client/requests/index.d.ts +0 -0
- 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 +9 -60
- package/dist/api/resources/fetch/client/Client.js +16 -129
- 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/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.d.ts +2 -1
- package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/ListContentRequest.d.ts +20 -0
- package/dist/api/resources/fetch/client/requests/{FetchSourcesRequest.js → ListContentRequest.js} +0 -0
- package/dist/api/resources/fetch/client/requests/SourceFetchRequest.d.ts +2 -2
- package/dist/api/resources/fetch/client/requests/SourceFetchRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/index.d.ts +1 -2
- package/dist/api/resources/fetch/client/requests/index.js +0 -0
- package/dist/api/resources/fetch/index.d.ts +1 -0
- package/dist/api/resources/fetch/index.js +1 -0
- package/dist/api/resources/fetch/types/FetchListKnowledgeResponse.d.ts +5 -0
- package/dist/api/resources/fetch/{client/requests/ListSourcesByIdRequest.js → types/FetchListKnowledgeResponse.js} +0 -0
- package/dist/api/resources/fetch/types/index.d.ts +1 -0
- package/dist/api/resources/fetch/types/index.js +17 -0
- package/dist/api/resources/index.d.ts +2 -1
- package/dist/api/resources/index.js +3 -2
- package/dist/api/resources/search/client/Client.d.ts +6 -45
- package/dist/api/resources/search/client/Client.js +12 -51
- 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 +3 -3
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/HybridSearchRequest.d.ts +6 -8
- package/dist/api/resources/search/client/requests/HybridSearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +2 -2
- package/dist/api/resources/search/client/requests/QnASearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/index.d.ts +0 -0
- 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 +2 -9
- package/dist/api/resources/sources/client/Client.js +4 -11
- 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 +2 -2
- package/dist/api/resources/sources/client/requests/SourceDeleteRequest.js +0 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +0 -0
- 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 +2 -54
- package/dist/api/resources/tenant/client/Client.js +4 -56
- 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 +1 -1
- package/dist/api/resources/tenant/client/requests/TenantCreateRequest.js +0 -0
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +1 -1
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.js +0 -0
- package/dist/api/resources/tenant/client/requests/index.d.ts +0 -0
- 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 +9 -73
- package/dist/api/resources/upload/client/Client.js +22 -140
- 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/BodyAddMemoryMemoriesAddMemoryPost.d.ts +1 -1
- package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.js +0 -0
- package/dist/api/resources/upload/client/requests/{BodyUploadDocumentIngestionUploadDocumentPost.d.ts → BodyUploadKnowledgeIngestionUploadKnowledgePost.d.ts} +7 -5
- package/dist/api/resources/upload/client/requests/{BodyUploadAppIngestionUploadAppPost.js → BodyUploadKnowledgeIngestionUploadKnowledgePost.js} +0 -0
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +2 -2
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.js +0 -0
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +2 -1
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.js +0 -0
- package/dist/api/resources/upload/client/requests/index.d.ts +1 -2
- 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 +0 -0
- package/dist/api/types/AddMemoryResponse.js +0 -0
- package/dist/api/types/ApiKeyInfo.d.ts +0 -0
- package/dist/api/types/ApiKeyInfo.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 +0 -0
- package/dist/api/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 +0 -0
- package/dist/api/types/CustomPropertyDefinition.js +0 -0
- package/dist/api/types/DashboardApisResponse.d.ts +0 -0
- package/dist/api/types/DashboardApisResponse.js +0 -0
- package/dist/api/types/DashboardSourcesResponse.d.ts +0 -0
- package/dist/api/types/DashboardSourcesResponse.js +0 -0
- package/dist/api/types/DashboardTenantsResponse.d.ts +0 -0
- package/dist/api/types/DashboardTenantsResponse.js +0 -0
- package/dist/api/types/DeleteResult.d.ts +0 -0
- package/dist/api/types/DeleteResult.js +0 -0
- package/dist/api/types/DeleteUserMemoryResponse.d.ts +0 -0
- package/dist/api/types/DeleteUserMemoryResponse.js +0 -0
- package/dist/api/types/Entity.d.ts +0 -0
- 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 +0 -0
- package/dist/api/types/FetchMode.js +0 -0
- package/dist/api/types/ForcefulRelationsPayload.d.ts +0 -0
- package/dist/api/types/ForcefulRelationsPayload.js +0 -0
- package/dist/api/types/GraphContext.d.ts +0 -0
- package/dist/api/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 +0 -0
- package/dist/api/types/Infra.js +0 -0
- package/dist/api/types/InsertResult.d.ts +0 -0
- package/dist/api/types/InsertResult.js +0 -0
- package/dist/api/types/ListContentKind.d.ts +8 -0
- package/dist/api/types/ListContentKind.js +10 -0
- package/dist/api/types/ListUserMemoriesResponse.d.ts +13 -0
- package/dist/api/{resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.js → types/ListUserMemoriesResponse.js} +0 -0
- package/dist/api/types/MemoryItem.d.ts +0 -0
- package/dist/api/types/MemoryItem.js +0 -0
- package/dist/api/types/MemoryResultItem.d.ts +0 -0
- package/dist/api/types/MemoryResultItem.js +0 -0
- package/dist/api/types/MilvusDataType.d.ts +0 -0
- package/dist/api/types/MilvusDataType.js +0 -0
- package/dist/api/types/PathTriplet.d.ts +0 -0
- package/dist/api/types/PathTriplet.js +0 -0
- package/dist/api/types/ProcessingStatus.d.ts +0 -0
- package/dist/api/types/ProcessingStatus.js +0 -0
- package/dist/api/types/QnASearchResponse.d.ts +0 -0
- package/dist/api/types/QnASearchResponse.js +0 -0
- package/dist/api/types/RawEmbeddingDocument.d.ts +0 -0
- package/dist/api/types/RawEmbeddingDocument.js +0 -0
- package/dist/api/types/RawEmbeddingSearchResult.d.ts +0 -0
- package/dist/api/types/RawEmbeddingSearchResult.js +0 -0
- package/dist/api/types/RawEmbeddingVector.d.ts +0 -0
- package/dist/api/types/RawEmbeddingVector.js +0 -0
- package/dist/api/types/RelationEvidence.d.ts +0 -0
- package/dist/api/types/RelationEvidence.js +0 -0
- package/dist/api/types/RetrievalResult.d.ts +1 -1
- package/dist/api/types/RetrievalResult.js +0 -0
- package/dist/api/types/RetrieveMode.d.ts +2 -2
- package/dist/api/types/RetrieveMode.js +1 -1
- package/dist/api/types/ScoredPathResponse.d.ts +0 -0
- package/dist/api/types/ScoredPathResponse.js +0 -0
- package/dist/api/types/SearchMode.d.ts +0 -0
- package/dist/api/types/SearchMode.js +0 -0
- package/dist/api/types/SourceDeleteResponse.d.ts +0 -0
- package/dist/api/types/SourceDeleteResponse.js +0 -0
- package/dist/api/types/SourceDeleteResultItem.d.ts +0 -0
- package/dist/api/types/SourceDeleteResultItem.js +0 -0
- package/dist/api/types/SourceFetchResponse.d.ts +0 -0
- package/dist/api/types/SourceFetchResponse.js +0 -0
- package/dist/api/types/SourceGraphRelationsResponse.d.ts +0 -0
- package/dist/api/types/SourceGraphRelationsResponse.js +0 -0
- package/dist/api/types/SourceListResponse.d.ts +0 -0
- package/dist/api/types/SourceListResponse.js +0 -0
- package/dist/api/types/SourceModel.d.ts +0 -0
- package/dist/api/types/SourceModel.js +0 -0
- package/dist/api/types/SourceStatus.d.ts +0 -0
- package/dist/api/types/SourceStatus.js +0 -0
- package/dist/api/types/SourceUploadResponse.d.ts +0 -0
- package/dist/api/types/SourceUploadResponse.js +0 -0
- package/dist/api/types/SourceUploadResultItem.d.ts +0 -0
- package/dist/api/types/SourceUploadResultItem.js +0 -0
- package/dist/api/types/SupportedLlmProviders.d.ts +0 -0
- package/dist/api/types/SupportedLlmProviders.js +0 -0
- package/dist/api/types/TenantCreateResponse.d.ts +0 -0
- package/dist/api/types/TenantCreateResponse.js +0 -0
- package/dist/api/types/TenantInfo.d.ts +0 -0
- package/dist/api/types/TenantInfo.js +0 -0
- package/dist/api/types/TenantMetadataSchemaInfo.d.ts +0 -0
- package/dist/api/types/TenantMetadataSchemaInfo.js +0 -0
- package/dist/api/types/TenantStatsResponse.d.ts +0 -0
- package/dist/api/types/TenantStatsResponse.js +0 -0
- package/dist/api/types/TripletWithEvidence.d.ts +0 -0
- package/dist/api/types/TripletWithEvidence.js +0 -0
- package/dist/api/types/UserAssistantPair.d.ts +0 -0
- package/dist/api/types/UserAssistantPair.js +0 -0
- package/dist/api/types/UserMemory.d.ts +12 -0
- package/dist/api/types/{AppSourcesUploadData.js → UserMemory.js} +0 -0
- package/dist/api/types/ValidationError.d.ts +0 -0
- package/dist/api/types/ValidationError.js +0 -0
- package/dist/api/types/VectorStoreChunk.d.ts +0 -0
- package/dist/api/types/VectorStoreChunk.js +0 -0
- package/dist/api/types/index.d.ts +3 -1
- package/dist/api/types/index.js +3 -1
- 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 +34 -31
- package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.d.ts +0 -15
- package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +0 -18
- package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +0 -31
- package/dist/api/types/AppSourcesUploadData.d.ts +0 -17
package/LICENSE
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
Copyright (c) 2024 Cortex AI
|
|
2
|
-
|
|
3
|
-
All Rights Reserved.
|
|
4
|
-
|
|
5
|
-
PROPRIETARY AND CONFIDENTIAL
|
|
6
|
-
|
|
7
|
-
This software is the proprietary and confidential property of Cortex AI ("the Company").
|
|
8
|
-
Permission is hereby granted to authorized users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company.
|
|
9
|
-
|
|
10
|
-
You may not, without the express written permission of the Company:
|
|
11
|
-
|
|
12
|
-
Copy, modify, or create derivative works of the software.
|
|
13
|
-
|
|
14
|
-
Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party.
|
|
15
|
-
|
|
16
|
-
Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
|
|
17
|
-
|
|
18
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
Copyright (c) 2024 Cortex AI
|
|
2
|
+
|
|
3
|
+
All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
PROPRIETARY AND CONFIDENTIAL
|
|
6
|
+
|
|
7
|
+
This software is the proprietary and confidential property of Cortex AI ("the Company").
|
|
8
|
+
Permission is hereby granted to authorized users to install and use this software as part of the Cortex AI service, subject to the terms and conditions of the service agreement entered into with the Company.
|
|
9
|
+
|
|
10
|
+
You may not, without the express written permission of the Company:
|
|
11
|
+
|
|
12
|
+
Copy, modify, or create derivative works of the software.
|
|
13
|
+
|
|
14
|
+
Distribute, sell, rent, lease, sublicense, or otherwise transfer the software to any third party.
|
|
15
|
+
|
|
16
|
+
Reverse engineer, decompile, or disassemble the software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
24
|
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
# Cortex AI TypeScript SDK
|
|
2
|
-
|
|
3
|
-
The official TypeScript SDK for the Cortex AI platform. Build powerful, context-aware AI applications in your Node.js or TypeScript projects.
|
|
4
|
-
|
|
5
|
-
**Cortex** is your plug-and-play memory infrastructure. It powers intelligent, context-aware retrieval for any AI app or agent. Whether you’re building a customer support bot, research copilot, or internal knowledge assistant - Cortex handles all!
|
|
6
|
-
|
|
7
|
-
[Learn more about the SDK from our docs](https://docs.usecortex.ai/)
|
|
8
|
-
|
|
9
|
-
## Core features
|
|
10
|
-
|
|
11
|
-
* **Dynamic retrieval and querying** that always retrieve the most relevant context
|
|
12
|
-
* **Built-in long-term memory** that evolves with every user interaction
|
|
13
|
-
* **Personalization hooks** for user preferences, intent, and history
|
|
14
|
-
* **Developer-first SDK** with the most flexible APIs and fine-grained controls
|
|
15
|
-
|
|
16
|
-
## Getting started
|
|
17
|
-
|
|
18
|
-
### Installation
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
npm i @usecortex_ai/node
|
|
22
|
-
# or
|
|
23
|
-
yarn add @usecortex_ai/node
|
|
24
|
-
# or
|
|
25
|
-
pnpm add @usecortex_ai/node
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Client setup
|
|
29
|
-
|
|
30
|
-
```ts
|
|
31
|
-
import { CortexAIClient } from "@usecortex_ai/node";
|
|
32
|
-
|
|
33
|
-
const client = new CortexAIClient({
|
|
34
|
-
token: process.env.CORTEX_API_KEY,
|
|
35
|
-
});
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Create a Tenant
|
|
39
|
-
|
|
40
|
-
You can consider a `tenant` as a single database that can have internal isolated collections called `sub-tenants`. [Know more about the concept of tenant here](https://docs.usecortex.ai/essentials/multi-tenant)
|
|
41
|
-
|
|
42
|
-
```ts
|
|
43
|
-
async function createTenant() {
|
|
44
|
-
const tenantCreationResponse = await client.user.createTenant({
|
|
45
|
-
tenant_id: "my-company"
|
|
46
|
-
});
|
|
47
|
-
return tenantCreationResponse;
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Index Your Data
|
|
52
|
-
|
|
53
|
-
When you index your data, you make it ready for retrieval from Cortex using natural language.
|
|
54
|
-
|
|
55
|
-
```ts
|
|
56
|
-
// Upload text content
|
|
57
|
-
async function uploadText() {
|
|
58
|
-
const res = await client.upload.uploadText({
|
|
59
|
-
tenant_id: "my-company",
|
|
60
|
-
sub_tenant_id: "engineering",
|
|
61
|
-
body: {
|
|
62
|
-
content: "Our API rate limits are 1000 requests per minute for premium accounts.",
|
|
63
|
-
file_id: "api-docs-rate-limits",
|
|
64
|
-
tenant_metadata: { sub_tenant_id: "engineering" }
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
return res;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Upload a document file
|
|
71
|
-
async function uploadFile() {
|
|
72
|
-
const uploadResult = await client.upload.uploadDocument({
|
|
73
|
-
file: fs.readFileSync("company-handbook.pdf"),
|
|
74
|
-
tenant_id: "my-company",
|
|
75
|
-
sub_tenant_id: "hr",
|
|
76
|
-
file_id: "doc_q1_summary"
|
|
77
|
-
});
|
|
78
|
-
return uploadResult;
|
|
79
|
-
}
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
> **For a more detailed explanation** of document upload, including supported file formats, processing pipeline, metadata handling, and advanced configuration options, refer to the [Upload Document endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/upload-document).
|
|
83
|
-
|
|
84
|
-
### Search and retrieval
|
|
85
|
-
|
|
86
|
-
```ts
|
|
87
|
-
// Semantic search with retrieval
|
|
88
|
-
const results = await client.search.retrieve({
|
|
89
|
-
query: "What are the API rate limits?",
|
|
90
|
-
tenant_id: "my-company",
|
|
91
|
-
sub_tenant_id: "engineering",
|
|
92
|
-
max_chunks: 10
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// List all sources
|
|
96
|
-
const allSources = await client.sources.getAll({
|
|
97
|
-
tenant_id: "my-company",
|
|
98
|
-
sub_tenant_id: "engineering"
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// Get specific sources by ID
|
|
102
|
-
const specificSources = await client.sources.getByIds({
|
|
103
|
-
tenant_id: "my-company",
|
|
104
|
-
sub_tenant_id: "engineering",
|
|
105
|
-
source_ids: ["api-docs-rate-limits", "company-handbook"]
|
|
106
|
-
});
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
> **For a more detailed explanation** of search and retrieval, including query parameters, scoring mechanisms, result structure, and advanced search features, refer to the [Search endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/search).
|
|
110
|
-
|
|
111
|
-
## SDK Method Structure & Type Safety
|
|
112
|
-
|
|
113
|
-
Our SDKs follow a predictable pattern that mirrors the API structure while providing full type safety.
|
|
114
|
-
|
|
115
|
-
> **Method Mapping** : `client.<group>.<functionName>` mirrors `api.usecortex.ai/<group>/<function_name>`
|
|
116
|
-
>
|
|
117
|
-
> For example: `client.upload.uploadText()` corresponds to `POST /upload/upload_text`
|
|
118
|
-
|
|
119
|
-
The SDKs provide exact type parity with the API specification:
|
|
120
|
-
|
|
121
|
-
- **Request Parameters** : Every field documented in the API reference (required, optional, types, validation rules) is reflected in the SDK method signatures
|
|
122
|
-
- **Response Objects** : Return types match the exact JSON schema documented for each endpoint
|
|
123
|
-
- **Error Types** : Exception structures mirror the error response formats from the API
|
|
124
|
-
- **Nested Objects** : Complex nested parameters and responses maintain their full structure and typing
|
|
125
|
-
|
|
126
|
-
> This means you can rely on your IDE’s autocomplete and type checking. If a parameter is optional in the API docs, it’s optional in the SDK. If a response contains a specific field, your IDE will know about it. Our SDKs are built in such a way that your IDE will automatically provide **autocompletion, type-checking, inline documentation with examples, and compile time validation** for each and every method.
|
|
127
|
-
>
|
|
128
|
-
> Just hit **Cmd+Space/Ctrl+Space!**
|
|
129
|
-
|
|
130
|
-
## Links
|
|
131
|
-
|
|
132
|
-
- **Homepage:** [usecortex.ai](https://www.usecortex.ai/)
|
|
133
|
-
- **Documentation:** [docs.usecortex.ai](https://docs.usecortex.ai/)
|
|
134
|
-
|
|
135
|
-
## Our docs
|
|
136
|
-
|
|
137
|
-
Please refer to our [API reference](https://docs.usecortex.ai/api-reference/introduction) for detailed explanations of every API endpoint, parameter options, and advanced use cases.
|
|
138
|
-
|
|
139
|
-
## Support
|
|
140
|
-
|
|
141
|
-
If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai).
|
|
1
|
+
# Cortex AI TypeScript SDK
|
|
2
|
+
|
|
3
|
+
The official TypeScript SDK for the Cortex AI platform. Build powerful, context-aware AI applications in your Node.js or TypeScript projects.
|
|
4
|
+
|
|
5
|
+
**Cortex** is your plug-and-play memory infrastructure. It powers intelligent, context-aware retrieval for any AI app or agent. Whether you’re building a customer support bot, research copilot, or internal knowledge assistant - Cortex handles all!
|
|
6
|
+
|
|
7
|
+
[Learn more about the SDK from our docs](https://docs.usecortex.ai/)
|
|
8
|
+
|
|
9
|
+
## Core features
|
|
10
|
+
|
|
11
|
+
* **Dynamic retrieval and querying** that always retrieve the most relevant context
|
|
12
|
+
* **Built-in long-term memory** that evolves with every user interaction
|
|
13
|
+
* **Personalization hooks** for user preferences, intent, and history
|
|
14
|
+
* **Developer-first SDK** with the most flexible APIs and fine-grained controls
|
|
15
|
+
|
|
16
|
+
## Getting started
|
|
17
|
+
|
|
18
|
+
### Installation
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
npm i @usecortex_ai/node
|
|
22
|
+
# or
|
|
23
|
+
yarn add @usecortex_ai/node
|
|
24
|
+
# or
|
|
25
|
+
pnpm add @usecortex_ai/node
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Client setup
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { CortexAIClient } from "@usecortex_ai/node";
|
|
32
|
+
|
|
33
|
+
const client = new CortexAIClient({
|
|
34
|
+
token: process.env.CORTEX_API_KEY,
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Create a Tenant
|
|
39
|
+
|
|
40
|
+
You can consider a `tenant` as a single database that can have internal isolated collections called `sub-tenants`. [Know more about the concept of tenant here](https://docs.usecortex.ai/essentials/multi-tenant)
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
async function createTenant() {
|
|
44
|
+
const tenantCreationResponse = await client.user.createTenant({
|
|
45
|
+
tenant_id: "my-company"
|
|
46
|
+
});
|
|
47
|
+
return tenantCreationResponse;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Index Your Data
|
|
52
|
+
|
|
53
|
+
When you index your data, you make it ready for retrieval from Cortex using natural language.
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
// Upload text content
|
|
57
|
+
async function uploadText() {
|
|
58
|
+
const res = await client.upload.uploadText({
|
|
59
|
+
tenant_id: "my-company",
|
|
60
|
+
sub_tenant_id: "engineering",
|
|
61
|
+
body: {
|
|
62
|
+
content: "Our API rate limits are 1000 requests per minute for premium accounts.",
|
|
63
|
+
file_id: "api-docs-rate-limits",
|
|
64
|
+
tenant_metadata: { sub_tenant_id: "engineering" }
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return res;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Upload a document file
|
|
71
|
+
async function uploadFile() {
|
|
72
|
+
const uploadResult = await client.upload.uploadDocument({
|
|
73
|
+
file: fs.readFileSync("company-handbook.pdf"),
|
|
74
|
+
tenant_id: "my-company",
|
|
75
|
+
sub_tenant_id: "hr",
|
|
76
|
+
file_id: "doc_q1_summary"
|
|
77
|
+
});
|
|
78
|
+
return uploadResult;
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
> **For a more detailed explanation** of document upload, including supported file formats, processing pipeline, metadata handling, and advanced configuration options, refer to the [Upload Document endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/upload-document).
|
|
83
|
+
|
|
84
|
+
### Search and retrieval
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
// Semantic search with retrieval
|
|
88
|
+
const results = await client.search.retrieve({
|
|
89
|
+
query: "What are the API rate limits?",
|
|
90
|
+
tenant_id: "my-company",
|
|
91
|
+
sub_tenant_id: "engineering",
|
|
92
|
+
max_chunks: 10
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// List all sources
|
|
96
|
+
const allSources = await client.sources.getAll({
|
|
97
|
+
tenant_id: "my-company",
|
|
98
|
+
sub_tenant_id: "engineering"
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// Get specific sources by ID
|
|
102
|
+
const specificSources = await client.sources.getByIds({
|
|
103
|
+
tenant_id: "my-company",
|
|
104
|
+
sub_tenant_id: "engineering",
|
|
105
|
+
source_ids: ["api-docs-rate-limits", "company-handbook"]
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
> **For a more detailed explanation** of search and retrieval, including query parameters, scoring mechanisms, result structure, and advanced search features, refer to the [Search endpoint documentation](https://docs.usecortex.ai/api-reference/endpoint/search).
|
|
110
|
+
|
|
111
|
+
## SDK Method Structure & Type Safety
|
|
112
|
+
|
|
113
|
+
Our SDKs follow a predictable pattern that mirrors the API structure while providing full type safety.
|
|
114
|
+
|
|
115
|
+
> **Method Mapping** : `client.<group>.<functionName>` mirrors `api.usecortex.ai/<group>/<function_name>`
|
|
116
|
+
>
|
|
117
|
+
> For example: `client.upload.uploadText()` corresponds to `POST /upload/upload_text`
|
|
118
|
+
|
|
119
|
+
The SDKs provide exact type parity with the API specification:
|
|
120
|
+
|
|
121
|
+
- **Request Parameters** : Every field documented in the API reference (required, optional, types, validation rules) is reflected in the SDK method signatures
|
|
122
|
+
- **Response Objects** : Return types match the exact JSON schema documented for each endpoint
|
|
123
|
+
- **Error Types** : Exception structures mirror the error response formats from the API
|
|
124
|
+
- **Nested Objects** : Complex nested parameters and responses maintain their full structure and typing
|
|
125
|
+
|
|
126
|
+
> This means you can rely on your IDE’s autocomplete and type checking. If a parameter is optional in the API docs, it’s optional in the SDK. If a response contains a specific field, your IDE will know about it. Our SDKs are built in such a way that your IDE will automatically provide **autocompletion, type-checking, inline documentation with examples, and compile time validation** for each and every method.
|
|
127
|
+
>
|
|
128
|
+
> Just hit **Cmd+Space/Ctrl+Space!**
|
|
129
|
+
|
|
130
|
+
## Links
|
|
131
|
+
|
|
132
|
+
- **Homepage:** [usecortex.ai](https://www.usecortex.ai/)
|
|
133
|
+
- **Documentation:** [docs.usecortex.ai](https://docs.usecortex.ai/)
|
|
134
|
+
|
|
135
|
+
## Our docs
|
|
136
|
+
|
|
137
|
+
Please refer to our [API reference](https://docs.usecortex.ai/api-reference/introduction) for detailed explanations of every API endpoint, parameter options, and advanced use cases.
|
|
138
|
+
|
|
139
|
+
## Support
|
|
140
|
+
|
|
141
|
+
If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai).
|
package/dist/Client.d.ts
CHANGED
|
@@ -50,8 +50,6 @@ export declare class CortexAIClient {
|
|
|
50
50
|
get search(): Search;
|
|
51
51
|
get dashboard(): Dashboard;
|
|
52
52
|
/**
|
|
53
|
-
* Endpoint that serves Prometheus metrics.
|
|
54
|
-
*
|
|
55
53
|
* @param {CortexAIClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
54
|
*
|
|
57
55
|
* @example
|
package/dist/Client.js
CHANGED
|
@@ -75,8 +75,6 @@ class CortexAIClient {
|
|
|
75
75
|
return ((_a = this._dashboard) !== null && _a !== void 0 ? _a : (this._dashboard = new Client_js_7.Dashboard(this._options)));
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
-
* Endpoint that serves Prometheus metrics.
|
|
79
|
-
*
|
|
80
78
|
* @param {CortexAIClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
79
|
*
|
|
82
80
|
* @example
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/api/errors/index.js
CHANGED
|
File without changes
|
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./resources/index.js"), exports);
|
|
17
18
|
__exportStar(require("./types/index.js"), exports);
|
|
18
19
|
__exportStar(require("./errors/index.js"), exports);
|
|
19
|
-
__exportStar(require("./resources/index.js"), exports);
|
|
@@ -30,11 +30,6 @@ export declare class Dashboard {
|
|
|
30
30
|
protected readonly _options: Dashboard.Options;
|
|
31
31
|
constructor(_options?: Dashboard.Options);
|
|
32
32
|
/**
|
|
33
|
-
* List all API keys for dashboard view.
|
|
34
|
-
*
|
|
35
|
-
* Uses Firebase authentication to identify the user and returns API keys
|
|
36
|
-
* associated with that user.
|
|
37
|
-
*
|
|
38
33
|
* @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
|
|
39
34
|
*
|
|
40
35
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -51,10 +46,6 @@ export declare class Dashboard {
|
|
|
51
46
|
listApis(requestOptions?: Dashboard.RequestOptions): core.HttpResponsePromise<CortexAI.DashboardApisResponse>;
|
|
52
47
|
private __listApis;
|
|
53
48
|
/**
|
|
54
|
-
* List all sources for a tenant/sub-tenant combination.
|
|
55
|
-
*
|
|
56
|
-
* Uses the same logic as the existing get_sources function.
|
|
57
|
-
*
|
|
58
49
|
* @param {CortexAI.ListSourcesDashboardSourcesGetRequest} request
|
|
59
50
|
* @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
51
|
*
|
|
@@ -68,18 +59,13 @@ export declare class Dashboard {
|
|
|
68
59
|
*
|
|
69
60
|
* @example
|
|
70
61
|
* await client.dashboard.listSources({
|
|
71
|
-
* tenant_id: "
|
|
72
|
-
* sub_tenant_id: "
|
|
62
|
+
* tenant_id: "tenant_1234",
|
|
63
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
73
64
|
* })
|
|
74
65
|
*/
|
|
75
66
|
listSources(request: CortexAI.ListSourcesDashboardSourcesGetRequest, requestOptions?: Dashboard.RequestOptions): core.HttpResponsePromise<CortexAI.DashboardSourcesResponse>;
|
|
76
67
|
private __listSources;
|
|
77
68
|
/**
|
|
78
|
-
* List all tenants for dashboard view.
|
|
79
|
-
*
|
|
80
|
-
* Uses Firebase authentication to identify the user and returns tenant
|
|
81
|
-
* mappings associated with that user's organization.
|
|
82
|
-
*
|
|
83
69
|
* @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
70
|
*
|
|
85
71
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -37,11 +37,6 @@ class Dashboard {
|
|
|
37
37
|
this._options = _options;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* List all API keys for dashboard view.
|
|
41
|
-
*
|
|
42
|
-
* Uses Firebase authentication to identify the user and returns API keys
|
|
43
|
-
* associated with that user.
|
|
44
|
-
*
|
|
45
40
|
* @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
|
|
46
41
|
*
|
|
47
42
|
* @throws {@link CortexAI.BadRequestError}
|
|
@@ -114,10 +109,6 @@ class Dashboard {
|
|
|
114
109
|
}
|
|
115
110
|
}
|
|
116
111
|
/**
|
|
117
|
-
* List all sources for a tenant/sub-tenant combination.
|
|
118
|
-
*
|
|
119
|
-
* Uses the same logic as the existing get_sources function.
|
|
120
|
-
*
|
|
121
112
|
* @param {CortexAI.ListSourcesDashboardSourcesGetRequest} request
|
|
122
113
|
* @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
114
|
*
|
|
@@ -131,8 +122,8 @@ class Dashboard {
|
|
|
131
122
|
*
|
|
132
123
|
* @example
|
|
133
124
|
* await client.dashboard.listSources({
|
|
134
|
-
* tenant_id: "
|
|
135
|
-
* sub_tenant_id: "
|
|
125
|
+
* tenant_id: "tenant_1234",
|
|
126
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
136
127
|
* })
|
|
137
128
|
*/
|
|
138
129
|
listSources(request, requestOptions) {
|
|
@@ -198,11 +189,6 @@ class Dashboard {
|
|
|
198
189
|
}
|
|
199
190
|
}
|
|
200
191
|
/**
|
|
201
|
-
* List all tenants for dashboard view.
|
|
202
|
-
*
|
|
203
|
-
* Uses Firebase authentication to identify the user and returns tenant
|
|
204
|
-
* mappings associated with that user's organization.
|
|
205
|
-
*
|
|
206
192
|
* @param {Dashboard.RequestOptions} requestOptions - Request-specific configuration.
|
|
207
193
|
*
|
|
208
194
|
* @throws {@link CortexAI.BadRequestError}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/api/resources/dashboard/client/requests/CreateUserDashboardUserCreateUserPostRequest.js
CHANGED
|
File without changes
|
package/dist/api/resources/dashboard/client/requests/ListSourcesDashboardSourcesGetRequest.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -30,16 +30,6 @@ export declare class Embeddings {
|
|
|
30
30
|
protected readonly _options: Embeddings.Options;
|
|
31
31
|
constructor(_options?: Embeddings.Options);
|
|
32
32
|
/**
|
|
33
|
-
* Upload pre-computed embeddings for advanced similarity search.
|
|
34
|
-
*
|
|
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.
|
|
38
|
-
*
|
|
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
33
|
* @param {CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost} request
|
|
44
34
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
45
35
|
*
|
|
@@ -53,11 +43,23 @@ export declare class Embeddings {
|
|
|
53
43
|
*
|
|
54
44
|
* @example
|
|
55
45
|
* await client.embeddings.insert({
|
|
56
|
-
* tenant_id: "
|
|
46
|
+
* tenant_id: "tenant_1234",
|
|
57
47
|
* embeddings: [{
|
|
58
|
-
* source_id: "source_id",
|
|
48
|
+
* source_id: "<source_id>",
|
|
49
|
+
* embeddings: [{
|
|
50
|
+
* chunk_id: "<chunk_id>",
|
|
51
|
+
* embedding: [1.1]
|
|
52
|
+
* }, {
|
|
53
|
+
* chunk_id: "<chunk_id>",
|
|
54
|
+
* embedding: [1.1]
|
|
55
|
+
* }]
|
|
56
|
+
* }, {
|
|
57
|
+
* source_id: "<source_id>",
|
|
59
58
|
* embeddings: [{
|
|
60
|
-
* chunk_id: "chunk_id",
|
|
59
|
+
* chunk_id: "<chunk_id>",
|
|
60
|
+
* embedding: [1.1]
|
|
61
|
+
* }, {
|
|
62
|
+
* chunk_id: "<chunk_id>",
|
|
61
63
|
* embedding: [1.1]
|
|
62
64
|
* }]
|
|
63
65
|
* }]
|
|
@@ -66,13 +68,6 @@ export declare class Embeddings {
|
|
|
66
68
|
insert(request: CortexAI.BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.InsertResult>;
|
|
67
69
|
private __insert;
|
|
68
70
|
/**
|
|
69
|
-
* Find similar chunks using an embedding vector.
|
|
70
|
-
*
|
|
71
|
-
* Use this to retrieve the most similar chunk IDs to a single query embedding.
|
|
72
|
-
*
|
|
73
|
-
* Expected outcome:
|
|
74
|
-
* - You receive the closest chunk IDs with optional similarity scores.
|
|
75
|
-
*
|
|
76
71
|
* @param {CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost} request
|
|
77
72
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
73
|
*
|
|
@@ -86,17 +81,14 @@ export declare class Embeddings {
|
|
|
86
81
|
*
|
|
87
82
|
* @example
|
|
88
83
|
* await client.embeddings.search({
|
|
89
|
-
* tenant_id: "
|
|
90
|
-
* sub_tenant_id: "
|
|
84
|
+
* tenant_id: "tenant_1234",
|
|
85
|
+
* sub_tenant_id: "sub_tenant_4567",
|
|
91
86
|
* query_embedding: [1.1]
|
|
92
87
|
* })
|
|
93
88
|
*/
|
|
94
89
|
search(request: CortexAI.BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
|
|
95
90
|
private __search;
|
|
96
91
|
/**
|
|
97
|
-
* Retrieve embeddings for specific chunk IDs.
|
|
98
|
-
* Use this when you already know the chunk IDs and need their corresponding embeddings.
|
|
99
|
-
*
|
|
100
92
|
* @param {CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost} request
|
|
101
93
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
94
|
*
|
|
@@ -110,18 +102,13 @@ export declare class Embeddings {
|
|
|
110
102
|
*
|
|
111
103
|
* @example
|
|
112
104
|
* await client.embeddings.filter({
|
|
113
|
-
* tenant_id: "
|
|
114
|
-
* sub_tenant_id: "
|
|
105
|
+
* tenant_id: "tenant_1234",
|
|
106
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
115
107
|
* })
|
|
116
108
|
*/
|
|
117
109
|
filter(request: CortexAI.BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.RawEmbeddingSearchResult[]>;
|
|
118
110
|
private __filter;
|
|
119
111
|
/**
|
|
120
|
-
* Delete embedding chunks by chunk ID.
|
|
121
|
-
*
|
|
122
|
-
* Use this to remove specific chunks from your embeddings index when they are no longer
|
|
123
|
-
* valid or should not appear in results.
|
|
124
|
-
*
|
|
125
112
|
* @param {CortexAI.EmbeddingsDeleteRequest} request
|
|
126
113
|
* @param {Embeddings.RequestOptions} requestOptions - Request-specific configuration.
|
|
127
114
|
*
|
|
@@ -135,7 +122,7 @@ export declare class Embeddings {
|
|
|
135
122
|
*
|
|
136
123
|
* @example
|
|
137
124
|
* await client.embeddings.delete({
|
|
138
|
-
* tenant_id: "
|
|
125
|
+
* tenant_id: "tenant_1234"
|
|
139
126
|
* })
|
|
140
127
|
*/
|
|
141
128
|
delete(request: CortexAI.EmbeddingsDeleteRequest, requestOptions?: Embeddings.RequestOptions): core.HttpResponsePromise<CortexAI.DeleteResult>;
|