@usecortex_ai/node 0.3.0 → 0.3.2
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/README.md +124 -11
- package/dist/api/resources/sources/client/Client.d.ts +29 -3
- package/dist/api/resources/sources/client/Client.js +92 -4
- package/dist/api/resources/sources/client/requests/SourcesGetAllRequest.d.ts +3 -2
- package/dist/api/resources/sources/client/requests/index.d.ts +1 -0
- package/package.json +8 -6
- package/dist/api/resources/sources/client/requests/SourcesGetSubTenantIdsRequest.d.ts +0 -12
- package/dist/api/resources/sources/client/requests/SourcesGetSubTenantIdsRequest.js +0 -5
- package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateMarkdownPatch.d.ts +0 -21
- package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateMarkdownPatch.js +0 -5
- package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateTextPatch.d.ts +0 -21
- package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateTextPatch.js +0 -5
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadMarkdownPost.d.ts +0 -19
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadMarkdownPost.js +0 -5
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadTextPost.d.ts +0 -19
- package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadTextPost.js +0 -5
- package/dist/api/resources/userMemory/client/requests/UserMemoryAddUserMemoryRequest.d.ts +0 -16
- package/dist/api/resources/userMemory/client/requests/UserMemoryAddUserMemoryRequest.js +0 -5
- package/dist/api/resources/userMemory/client/requests/UserMemoryGenerateUserMemoryRequest.d.ts +0 -18
- package/dist/api/resources/userMemory/client/requests/UserMemoryGenerateUserMemoryRequest.js +0 -5
- package/dist/api/resources/userMemory/client/requests/UserMemoryRetrieveUserMemoryRequest.d.ts +0 -17
- package/dist/api/resources/userMemory/client/requests/UserMemoryRetrieveUserMemoryRequest.js +0 -5
- package/dist/api/types/SourceContent.d.ts +0 -11
- package/dist/api/types/SourceContent.js +0 -5
package/README.md
CHANGED
|
@@ -2,27 +2,140 @@
|
|
|
2
2
|
|
|
3
3
|
The official TypeScript SDK for the Cortex AI platform. Build powerful, context-aware AI applications in your Node.js or TypeScript projects.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
* **Documentation:** [docs.usecortex.ai](https://docs.usecortex.ai/ "null")
|
|
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!
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
[Learn more about the SDK from our docs](https://docs.usecortex.ai/)
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
## Core features
|
|
11
10
|
|
|
12
|
-
|
|
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
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
## Getting started
|
|
15
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
|
+
}
|
|
16
80
|
```
|
|
17
|
-
import { CortexAI } from "@usecortex/ai";
|
|
18
81
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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"
|
|
22
99
|
});
|
|
23
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
|
+
});
|
|
24
107
|
```
|
|
25
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
|
+
|
|
26
139
|
## Support
|
|
27
140
|
|
|
28
|
-
If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai
|
|
141
|
+
If you have any questions or need help, please reach out to our support team at [founders@usecortex.ai](mailto:founders@usecortex.ai).
|
|
@@ -29,6 +29,32 @@ export declare namespace Sources {
|
|
|
29
29
|
export declare class Sources {
|
|
30
30
|
protected readonly _options: Sources.Options;
|
|
31
31
|
constructor(_options?: Sources.Options);
|
|
32
|
+
/**
|
|
33
|
+
* Retrieve all sources for a specific tenant.
|
|
34
|
+
*
|
|
35
|
+
* Use this endpoint to fetch a complete list of all sources associated with your tenant. This includes documents, files, and other content you've uploaded for processing.
|
|
36
|
+
*
|
|
37
|
+
* You can optionally specify a sub-tenant to narrow down the results to sources within that specific sub-tenant scope.
|
|
38
|
+
*
|
|
39
|
+
* @param {CortexAI.SourcesGetAllRequest} request
|
|
40
|
+
* @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
|
|
41
|
+
*
|
|
42
|
+
* @throws {@link CortexAI.BadRequestError}
|
|
43
|
+
* @throws {@link CortexAI.UnauthorizedError}
|
|
44
|
+
* @throws {@link CortexAI.ForbiddenError}
|
|
45
|
+
* @throws {@link CortexAI.NotFoundError}
|
|
46
|
+
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
47
|
+
* @throws {@link CortexAI.InternalServerError}
|
|
48
|
+
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* await client.sources.getAll({
|
|
52
|
+
* tenant_id: "tenant_1234",
|
|
53
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
54
|
+
* })
|
|
55
|
+
*/
|
|
56
|
+
getAll(request: CortexAI.SourcesGetAllRequest, requestOptions?: Sources.RequestOptions): core.HttpResponsePromise<CortexAI.ListSourcesResponse>;
|
|
57
|
+
private __getAll;
|
|
32
58
|
/**
|
|
33
59
|
* Retrieve specific sources by their IDs.
|
|
34
60
|
*
|
|
@@ -48,12 +74,12 @@ export declare class Sources {
|
|
|
48
74
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
49
75
|
*
|
|
50
76
|
* @example
|
|
51
|
-
* await client.sources.
|
|
77
|
+
* await client.sources.getByIds({
|
|
52
78
|
* tenant_id: "tenant_1234",
|
|
53
79
|
* source_ids: ["CortexDoc1234", "CortexDoc4567"]
|
|
54
80
|
* })
|
|
55
81
|
*/
|
|
56
|
-
|
|
57
|
-
private
|
|
82
|
+
getByIds(request: CortexAI.SourceBodyParams, requestOptions?: Sources.RequestOptions): core.HttpResponsePromise<CortexAI.ListSourcesResponse>;
|
|
83
|
+
private __getByIds;
|
|
58
84
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
59
85
|
}
|
|
@@ -36,6 +36,94 @@ class Sources {
|
|
|
36
36
|
constructor(_options = {}) {
|
|
37
37
|
this._options = _options;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Retrieve all sources for a specific tenant.
|
|
41
|
+
*
|
|
42
|
+
* Use this endpoint to fetch a complete list of all sources associated with your tenant. This includes documents, files, and other content you've uploaded for processing.
|
|
43
|
+
*
|
|
44
|
+
* You can optionally specify a sub-tenant to narrow down the results to sources within that specific sub-tenant scope.
|
|
45
|
+
*
|
|
46
|
+
* @param {CortexAI.SourcesGetAllRequest} request
|
|
47
|
+
* @param {Sources.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link CortexAI.BadRequestError}
|
|
50
|
+
* @throws {@link CortexAI.UnauthorizedError}
|
|
51
|
+
* @throws {@link CortexAI.ForbiddenError}
|
|
52
|
+
* @throws {@link CortexAI.NotFoundError}
|
|
53
|
+
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
54
|
+
* @throws {@link CortexAI.InternalServerError}
|
|
55
|
+
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.sources.getAll({
|
|
59
|
+
* tenant_id: "tenant_1234",
|
|
60
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
61
|
+
* })
|
|
62
|
+
*/
|
|
63
|
+
getAll(request, requestOptions) {
|
|
64
|
+
return core.HttpResponsePromise.fromPromise(this.__getAll(request, requestOptions));
|
|
65
|
+
}
|
|
66
|
+
async __getAll(request, requestOptions) {
|
|
67
|
+
var _a, _b, _c;
|
|
68
|
+
const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request;
|
|
69
|
+
const _queryParams = {};
|
|
70
|
+
_queryParams["tenant_id"] = tenantId;
|
|
71
|
+
if (subTenantId != null) {
|
|
72
|
+
_queryParams["sub_tenant_id"] = subTenantId;
|
|
73
|
+
}
|
|
74
|
+
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);
|
|
75
|
+
const _response = await core.fetcher({
|
|
76
|
+
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, "list/sources"),
|
|
77
|
+
method: "GET",
|
|
78
|
+
headers: _headers,
|
|
79
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
80
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
81
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
82
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
83
|
+
});
|
|
84
|
+
if (_response.ok) {
|
|
85
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
86
|
+
}
|
|
87
|
+
if (_response.error.reason === "status-code") {
|
|
88
|
+
switch (_response.error.statusCode) {
|
|
89
|
+
case 400:
|
|
90
|
+
throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
|
|
91
|
+
case 401:
|
|
92
|
+
throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
93
|
+
case 403:
|
|
94
|
+
throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
95
|
+
case 404:
|
|
96
|
+
throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
97
|
+
case 422:
|
|
98
|
+
throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
99
|
+
case 500:
|
|
100
|
+
throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
|
|
101
|
+
case 503:
|
|
102
|
+
throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
103
|
+
default:
|
|
104
|
+
throw new errors.CortexAIError({
|
|
105
|
+
statusCode: _response.error.statusCode,
|
|
106
|
+
body: _response.error.body,
|
|
107
|
+
rawResponse: _response.rawResponse,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
switch (_response.error.reason) {
|
|
112
|
+
case "non-json":
|
|
113
|
+
throw new errors.CortexAIError({
|
|
114
|
+
statusCode: _response.error.statusCode,
|
|
115
|
+
body: _response.error.rawBody,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
});
|
|
118
|
+
case "timeout":
|
|
119
|
+
throw new errors.CortexAITimeoutError("Timeout exceeded when calling GET /list/sources.");
|
|
120
|
+
case "unknown":
|
|
121
|
+
throw new errors.CortexAIError({
|
|
122
|
+
message: _response.error.errorMessage,
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
39
127
|
/**
|
|
40
128
|
* Retrieve specific sources by their IDs.
|
|
41
129
|
*
|
|
@@ -55,15 +143,15 @@ class Sources {
|
|
|
55
143
|
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
56
144
|
*
|
|
57
145
|
* @example
|
|
58
|
-
* await client.sources.
|
|
146
|
+
* await client.sources.getByIds({
|
|
59
147
|
* tenant_id: "tenant_1234",
|
|
60
148
|
* source_ids: ["CortexDoc1234", "CortexDoc4567"]
|
|
61
149
|
* })
|
|
62
150
|
*/
|
|
63
|
-
|
|
64
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
151
|
+
getByIds(request, requestOptions) {
|
|
152
|
+
return core.HttpResponsePromise.fromPromise(this.__getByIds(request, requestOptions));
|
|
65
153
|
}
|
|
66
|
-
async
|
|
154
|
+
async __getByIds(request, requestOptions) {
|
|
67
155
|
var _a, _b, _c;
|
|
68
156
|
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);
|
|
69
157
|
const _response = await core.fetcher({
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
|
-
* tenant_id: "
|
|
7
|
+
* tenant_id: "tenant_1234",
|
|
8
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
8
9
|
* }
|
|
9
10
|
*/
|
|
10
11
|
export interface SourcesGetAllRequest {
|
|
11
12
|
/** Unique identifier for the tenant/organization */
|
|
12
13
|
tenant_id: string;
|
|
13
|
-
/** Optional sub-tenant identifier
|
|
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. */
|
|
14
15
|
sub_tenant_id?: string;
|
|
15
16
|
}
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usecortex_ai/node",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "The official TypeScript SDK for the Cortex AI platform.",
|
|
5
5
|
"author": "Nishkarsh Shrivastava <nishkarsh@usecortex.ai>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
-
"private": false,
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/usefindr/cortex-ai-ts.git"
|
|
11
|
-
},
|
|
12
7
|
"main": "./dist/index.js",
|
|
13
8
|
"types": "./dist/index.d.ts",
|
|
14
9
|
"files": [
|
|
15
10
|
"dist"
|
|
16
11
|
],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"cortex",
|
|
14
|
+
"cortex-ai",
|
|
15
|
+
"cortex-ai-sdk",
|
|
16
|
+
"cortex-ai-typescript-sdk",
|
|
17
|
+
"rag", "gen-ai", "memory", "ai"
|
|
18
|
+
],
|
|
17
19
|
"scripts": {
|
|
18
20
|
"build": "tsc",
|
|
19
21
|
"prepublishOnly": "npm run build"
|
package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateMarkdownPatch.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
* source_id: "source_id",
|
|
9
|
-
* tenant_id: "tenant_id",
|
|
10
|
-
* request: {
|
|
11
|
-
* content: "content"
|
|
12
|
-
* }
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface BodyUpdateMarkdownUploadUpdateMarkdownPatch {
|
|
16
|
-
source_id: string;
|
|
17
|
-
tenant_id: string;
|
|
18
|
-
sub_tenant_id?: string;
|
|
19
|
-
request: CortexAI.MarkdownUploadRequest;
|
|
20
|
-
relations?: CortexAI.Relations;
|
|
21
|
-
}
|
package/dist/api/resources/upload/client/requests/BodyUpdateMarkdownUploadUpdateTextPatch.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
* source_id: "source_id",
|
|
9
|
-
* tenant_id: "tenant_id",
|
|
10
|
-
* request: {
|
|
11
|
-
* content: "content"
|
|
12
|
-
* }
|
|
13
|
-
* }
|
|
14
|
-
*/
|
|
15
|
-
export interface BodyUpdateMarkdownUploadUpdateTextPatch {
|
|
16
|
-
source_id: string;
|
|
17
|
-
tenant_id: string;
|
|
18
|
-
sub_tenant_id?: string;
|
|
19
|
-
request: CortexAI.MarkdownUploadRequest;
|
|
20
|
-
relations?: CortexAI.Relations;
|
|
21
|
-
}
|
package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadMarkdownPost.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
* request: {
|
|
10
|
-
* content: "content"
|
|
11
|
-
* }
|
|
12
|
-
* }
|
|
13
|
-
*/
|
|
14
|
-
export interface BodyUploadMarkdownUploadUploadMarkdownPost {
|
|
15
|
-
tenant_id: string;
|
|
16
|
-
sub_tenant_id?: string;
|
|
17
|
-
request: CortexAI.MarkdownUploadRequest;
|
|
18
|
-
relations?: CortexAI.Relations;
|
|
19
|
-
}
|
package/dist/api/resources/upload/client/requests/BodyUploadMarkdownUploadUploadTextPost.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
* request: {
|
|
10
|
-
* content: "content"
|
|
11
|
-
* }
|
|
12
|
-
* }
|
|
13
|
-
*/
|
|
14
|
-
export interface BodyUploadMarkdownUploadUploadTextPost {
|
|
15
|
-
tenant_id: string;
|
|
16
|
-
sub_tenant_id?: string;
|
|
17
|
-
request: CortexAI.MarkdownUploadRequest;
|
|
18
|
-
relations?: CortexAI.Relations;
|
|
19
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_id",
|
|
8
|
-
* user_memory: "user_memory",
|
|
9
|
-
* sub_tenant_id: "sub_tenant_id"
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface UserMemoryAddUserMemoryRequest {
|
|
13
|
-
tenant_id: string;
|
|
14
|
-
user_memory: string;
|
|
15
|
-
sub_tenant_id: string;
|
|
16
|
-
}
|
package/dist/api/resources/userMemory/client/requests/UserMemoryGenerateUserMemoryRequest.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_id",
|
|
8
|
-
* user_query: "user_query",
|
|
9
|
-
* user_name: "user_name",
|
|
10
|
-
* sub_tenant_id: "sub_tenant_id"
|
|
11
|
-
* }
|
|
12
|
-
*/
|
|
13
|
-
export interface UserMemoryGenerateUserMemoryRequest {
|
|
14
|
-
tenant_id: string;
|
|
15
|
-
user_query: string;
|
|
16
|
-
user_name: string;
|
|
17
|
-
sub_tenant_id: string;
|
|
18
|
-
}
|
package/dist/api/resources/userMemory/client/requests/UserMemoryRetrieveUserMemoryRequest.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* @example
|
|
6
|
-
* {
|
|
7
|
-
* tenant_id: "tenant_id",
|
|
8
|
-
* query: "query",
|
|
9
|
-
* sub_tenant_id: "sub_tenant_id"
|
|
10
|
-
* }
|
|
11
|
-
*/
|
|
12
|
-
export interface UserMemoryRetrieveUserMemoryRequest {
|
|
13
|
-
tenant_id: string;
|
|
14
|
-
query: string;
|
|
15
|
-
sub_tenant_id: string;
|
|
16
|
-
max_count?: number;
|
|
17
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
*/
|
|
4
|
-
export interface SourceContent {
|
|
5
|
-
text?: string;
|
|
6
|
-
html_base64?: string;
|
|
7
|
-
csv_base64?: string;
|
|
8
|
-
markdown?: string;
|
|
9
|
-
files?: Record<string, unknown>[];
|
|
10
|
-
layout?: Record<string, unknown>[];
|
|
11
|
-
}
|