@usecortex_ai/node 0.4.0 → 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 +0 -0
- package/dist/Client.js +0 -0
- 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 +0 -0
- package/dist/api/index.js +0 -0
- package/dist/api/resources/dashboard/client/Client.d.ts +0 -0
- package/dist/api/resources/dashboard/client/Client.js +0 -0
- 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 +0 -0
- 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 +0 -0
- package/dist/api/resources/embeddings/client/Client.js +0 -0
- 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 +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyFilterRawEmbeddingsEndpointEmbeddingsFilterRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.d.ts +0 -0
- package/dist/api/resources/embeddings/client/requests/BodyInsertRawEmbeddingsEndpointEmbeddingsInsertRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.d.ts +0 -0
- package/dist/api/resources/embeddings/client/requests/BodySearchRawEmbeddingsEndpointEmbeddingsSearchRawEmbeddingsPost.js +0 -0
- package/dist/api/resources/embeddings/client/requests/EmbeddingsDeleteRequest.d.ts +0 -0
- 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 +0 -0
- package/dist/api/resources/fetch/client/Client.js +0 -0
- 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 +0 -0
- package/dist/api/resources/fetch/client/requests/FetchGraphRelationsBySourceIdRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.d.ts +0 -0
- package/dist/api/resources/fetch/client/requests/FetchSourcesRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.d.ts +0 -0
- package/dist/api/resources/fetch/client/requests/ListSourcesByIdRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/SourceFetchRequest.d.ts +0 -0
- package/dist/api/resources/fetch/client/requests/SourceFetchRequest.js +0 -0
- package/dist/api/resources/fetch/client/requests/index.d.ts +0 -0
- 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 +0 -0
- package/dist/api/resources/index.js +0 -0
- package/dist/api/resources/search/client/Client.d.ts +5 -0
- package/dist/api/resources/search/client/Client.js +5 -0
- 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 +0 -0
- package/dist/api/resources/search/client/requests/FullTextSearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/HybridSearchRequest.d.ts +2 -0
- package/dist/api/resources/search/client/requests/HybridSearchRequest.js +0 -0
- package/dist/api/resources/search/client/requests/QnASearchRequest.d.ts +0 -0
- 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 +0 -0
- package/dist/api/resources/sources/client/Client.js +0 -0
- 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 +0 -0
- 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 +0 -0
- package/dist/api/resources/tenant/client/Client.js +0 -0
- 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 +0 -0
- package/dist/api/resources/tenant/client/requests/TenantCreateRequest.js +0 -0
- package/dist/api/resources/tenant/client/requests/TenantStatsRequest.d.ts +0 -0
- 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 +0 -0
- package/dist/api/resources/upload/client/Client.js +0 -0
- 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 +0 -0
- package/dist/api/resources/upload/client/requests/BodyAddMemoryMemoriesAddMemoryPost.js +0 -0
- package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.d.ts +0 -0
- package/dist/api/resources/upload/client/requests/BodyUploadAppIngestionUploadAppPost.js +0 -0
- package/dist/api/resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.d.ts +0 -0
- package/dist/api/resources/upload/client/requests/BodyUploadDocumentIngestionUploadDocumentPost.js +0 -0
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.d.ts +0 -0
- package/dist/api/resources/upload/client/requests/UploadDeleteMemoryRequest.js +0 -0
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.d.ts +0 -0
- package/dist/api/resources/upload/client/requests/UploadVerifyProcessingRequest.js +0 -0
- package/dist/api/resources/upload/client/requests/index.d.ts +0 -0
- 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/AppSourcesUploadData.d.ts +0 -0
- 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 +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 +9 -0
- package/dist/api/types/ForcefulRelationsPayload.js +5 -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/MemoryItem.d.ts +3 -1
- 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 +2 -0
- package/dist/api/types/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 +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/ValidationError.d.ts +0 -0
- package/dist/api/types/ValidationError.js +0 -0
- package/dist/api/types/VectorStoreChunk.d.ts +2 -0
- package/dist/api/types/VectorStoreChunk.js +0 -0
- package/dist/api/types/index.d.ts +1 -0
- package/dist/api/types/index.js +1 -0
- 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 +30 -30
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
|
File without changes
|
package/dist/Client.js
CHANGED
|
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
|
|
File without changes
|
package/dist/api/errors/index.js
CHANGED
|
File without changes
|
package/dist/api/index.d.ts
CHANGED
|
File without changes
|
package/dist/api/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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.d.ts
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
|
|
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
|
|
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
|
|
@@ -43,6 +43,11 @@ export declare class Search {
|
|
|
43
43
|
* - "fast" (default): Single query, faster response
|
|
44
44
|
* - "accurate": Multi-query generation with reranking, higher quality
|
|
45
45
|
*
|
|
46
|
+
* Use `filters` to narrow results by metadata:
|
|
47
|
+
* - Provide key-value pairs matching fields defined in your tenant_metadata_schema
|
|
48
|
+
* - Example: `{"category": "engineering", "priority": "high"}`
|
|
49
|
+
* - Filters are validated against your tenant schema for type safety
|
|
50
|
+
*
|
|
46
51
|
* @param {CortexAI.HybridSearchRequest} request
|
|
47
52
|
* @param {Search.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
53
|
*
|
|
@@ -50,6 +50,11 @@ class Search {
|
|
|
50
50
|
* - "fast" (default): Single query, faster response
|
|
51
51
|
* - "accurate": Multi-query generation with reranking, higher quality
|
|
52
52
|
*
|
|
53
|
+
* Use `filters` to narrow results by metadata:
|
|
54
|
+
* - Provide key-value pairs matching fields defined in your tenant_metadata_schema
|
|
55
|
+
* - Example: `{"category": "engineering", "priority": "high"}`
|
|
56
|
+
* - Filters are validated against your tenant schema for type safety
|
|
57
|
+
*
|
|
53
58
|
* @param {CortexAI.HybridSearchRequest} request
|
|
54
59
|
* @param {Search.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
60
|
*
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -34,6 +34,8 @@ export interface HybridSearchRequest {
|
|
|
34
34
|
extra_context?: string;
|
|
35
35
|
/** What to search: 'sources' for documents or 'memories' for user memories */
|
|
36
36
|
search_mode?: CortexAI.SearchMode;
|
|
37
|
+
/** Optional key-value pairs to filter search results by tenant metadata fields. Keys must match fields defined in tenant_metadata_schema during tenant creation. Supports exact match filtering on indexed metadata fields. Example: {'category': 'engineering', 'priority': 'high'} */
|
|
38
|
+
filters?: Record<string, unknown>;
|
|
37
39
|
}
|
|
38
40
|
export declare namespace HybridSearchRequest {
|
|
39
41
|
/**
|
|
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
|
|
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
|