@memori.ai/memori-api-client
Advanced tools
Comparing version 2.3.0 to 2.4.0
## [2.4.0](https://github.com/memori-ai/memori-api-client/compare/v2.3.0...v2.4.0) (2023-11-13) | ||
### Features | ||
* update api and typings ([535d118](https://github.com/memori-ai/memori-api-client/commit/535d118730bbc80435385a8df093e65fae41fe02)) | ||
## [2.3.0](https://github.com/memori-ai/memori-api-client/compare/v2.2.2...v2.3.0) (2023-09-11) | ||
@@ -4,0 +11,0 @@ |
@@ -18,2 +18,3 @@ declare const backendAPI: (apiUrl: string) => { | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -174,4 +175,4 @@ notifications: import("./types").Notification[]; | ||
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>; | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -185,4 +186,4 @@ }>; | ||
asset: { | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -380,4 +381,5 @@ }>; | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
}; | ||
}; | ||
export default backendAPI; |
import { ResponseSpec, Asset } from '../types'; | ||
declare const _default: (apiUrl: string) => { | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string) => Promise<ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string, memoryID?: string) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string, memoryID?: string) => Promise<ResponseSpec & { | ||
asset: Asset; | ||
@@ -6,0 +6,0 @@ }>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.default = (apiUrl) => ({ | ||
getUploadAssetURL: (authToken, memoriID, memoryID) => `${apiUrl}/Asset/${authToken}/${memoriID}${memoryID ? `/${memoryID}` : ''}`, | ||
getUploadAssetURL: (authToken, memoriID, memoryID) => `${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${memoryID ? `/${memoryID}` : ''}`, | ||
uploadAsset: async (fileName, fileUrl, authToken, memoriID, memoryID) => { | ||
@@ -12,3 +12,3 @@ const data = new FormData(); | ||
data.append(fileName, fileBlob, fileName); | ||
const upload = await fetch(`${apiUrl}/Asset/${authToken}/${memoriID}${memoryID ? `/${memoryID}` : ''}`, { | ||
const upload = await fetch(`${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${memoryID ? `/${memoryID}` : ''}`, { | ||
method: 'POST', | ||
@@ -15,0 +15,0 @@ body: data, |
@@ -1,2 +0,2 @@ | ||
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs } from '../types'; | ||
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs, JSONLSpecs } from '../types'; | ||
declare const _default: (apiUrl: string) => { | ||
@@ -19,3 +19,4 @@ importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & { | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: CsvSpecs, password?: string) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: JSONLSpecs, password?: string) => Promise<string>; | ||
}; | ||
export default _default; |
@@ -42,3 +42,12 @@ "use strict"; | ||
}), | ||
exportJSONL: async (authToken, memoriID, jsonlSpecs, password) => (0, apiFetcher_1.apiFetcher)(`/ImportExport/ExportJSONL/${authToken}/${memoriID}`, { | ||
apiUrl, | ||
method: 'POST', | ||
body: { | ||
jsonlSpecs, | ||
password, | ||
}, | ||
text: true, | ||
}), | ||
}); | ||
//# sourceMappingURL=importExport.js.map |
@@ -5,6 +5,6 @@ "use strict"; | ||
exports.default = (apiUrl) => ({ | ||
getTenantPublicMemoriList: (tenant) => (0, apiFetcher_1.apiFetcher)(`/TenantPublicMemori/${encodeURI(tenant)}`, { | ||
getTenantPublicMemoriList: (tenant) => (0, apiFetcher_1.apiFetcher)(`/TenantPublicMemori/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
}), | ||
getTenantMetaverseMemoriList: (tenant) => (0, apiFetcher_1.apiFetcher)(`/TenantMetaverseMemori/${encodeURI(tenant)}`, { | ||
getTenantMetaverseMemoriList: (tenant) => (0, apiFetcher_1.apiFetcher)(`/TenantMetaverseMemori/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
@@ -30,3 +30,3 @@ }), | ||
}), | ||
getTenantCategories: (tenant) => (0, apiFetcher_1.apiFetcher)(`/TenantMemoriCategories/${encodeURI(tenant)}`, { | ||
getTenantCategories: (tenant) => (0, apiFetcher_1.apiFetcher)(`/TenantMemoriCategories/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
@@ -58,3 +58,3 @@ }), | ||
}), | ||
getMemori: (tenant, userName, memoriName, authToken) => (0, apiFetcher_1.apiFetcher)(`/Memori/${encodeURI(tenant)}/${encodeURI(userName)}/${encodeURI(memoriName)}/${authToken !== null && authToken !== void 0 ? authToken : ''}`, { | ||
getMemori: (tenant, userName, memoriName, authToken) => (0, apiFetcher_1.apiFetcher)(`/Memori/${encodeURIComponent(tenant)}/${encodeURIComponent(userName)}/${encodeURIComponent(memoriName)}/${authToken !== null && authToken !== void 0 ? authToken : ''}`, { | ||
apiUrl, | ||
@@ -61,0 +61,0 @@ }), |
@@ -488,2 +488,3 @@ import * as constants from './constants'; | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -644,4 +645,4 @@ notifications: import("./types").Notification[]; | ||
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>; | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -655,4 +656,4 @@ }>; | ||
asset: { | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -850,2 +851,3 @@ }>; | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
}; | ||
@@ -852,0 +854,0 @@ }; |
@@ -52,15 +52,19 @@ export declare type Error = { | ||
exposed?: boolean; | ||
ageRestriction?: number; | ||
nsfw?: boolean; | ||
disableR2R3Loop?: boolean; | ||
disableR4Loop?: boolean; | ||
disableR5Loop?: boolean; | ||
ageRestriction?: number; | ||
nsfw?: boolean; | ||
enableCompletions?: boolean; | ||
completionDescription?: string; | ||
completionProvider?: '-' | 'OpenAI'; | ||
completionProviderConfig?: string; | ||
enableDeepThought?: boolean; | ||
disableCompletionMediaExtraction?: boolean; | ||
chainingMemoriID?: string; | ||
chainingBaseURL?: string; | ||
chainingPassword?: string; | ||
properties?: { | ||
[key: string]: any; | ||
}; | ||
properties?: [{ | ||
[key: string]: string; | ||
}]; | ||
creationTimestamp?: string; | ||
@@ -110,2 +114,3 @@ lastChangeTimestamp?: string; | ||
canEditMemoriChaining?: boolean; | ||
enableBadges?: boolean; | ||
monthSessions?: number; | ||
@@ -117,2 +122,4 @@ monthValidSessions?: number; | ||
maxCompletions?: number; | ||
monthImportedSize?: number; | ||
maxImportSize?: number; | ||
creationTimestamp?: string; | ||
@@ -122,2 +129,4 @@ lastChangeTimestamp?: string; | ||
couponCode?: string; | ||
defaultCompletionProvider?: '-' | 'OpenAI'; | ||
defaultCompletionProviderConfig?: string; | ||
paying?: boolean; | ||
@@ -129,2 +138,5 @@ notificationPrefs?: NotificationPrefs[]; | ||
tnCAndPPAcceptanceDate?: string; | ||
avatarURL?: string; | ||
avatar3DURL?: string; | ||
avatar3DURLType?: string; | ||
}; | ||
@@ -512,2 +524,8 @@ export declare type IntegrationResource = { | ||
completions: number; | ||
promptTokens: { | ||
[key: string]: number; | ||
}; | ||
completionTokens: { | ||
[key: string]: number; | ||
}; | ||
}; | ||
@@ -618,2 +636,6 @@ export type Notification = { | ||
} | ||
export interface JSONLSpecs { | ||
platform?: string; | ||
includeInstructions?: boolean; | ||
} | ||
export interface ImportParams { | ||
@@ -652,2 +674,3 @@ forceImport?: boolean; | ||
importedMemories?: number; | ||
importWarningsCount?: number; | ||
importWarnings?: ImportWarning[]; | ||
@@ -654,0 +677,0 @@ } |
@@ -18,2 +18,3 @@ declare const backendAPI: (apiUrl: string) => { | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -174,4 +175,4 @@ notifications: import("./types").Notification[]; | ||
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>; | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -185,4 +186,4 @@ }>; | ||
asset: { | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -380,4 +381,5 @@ }>; | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
}; | ||
}; | ||
export default backendAPI; |
import { ResponseSpec, Asset } from '../types'; | ||
declare const _default: (apiUrl: string) => { | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string) => Promise<ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string, memoryID?: string) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string, memoryID?: string) => Promise<ResponseSpec & { | ||
asset: Asset; | ||
@@ -6,0 +6,0 @@ }>; |
import { apiFetcher } from '../apiFetcher'; | ||
export default (apiUrl) => ({ | ||
getUploadAssetURL: (authToken, memoriID, memoryID) => `${apiUrl}/Asset/${authToken}/${memoriID}${memoryID ? `/${memoryID}` : ''}`, | ||
getUploadAssetURL: (authToken, memoriID, memoryID) => `${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${memoryID ? `/${memoryID}` : ''}`, | ||
uploadAsset: async (fileName, fileUrl, authToken, memoriID, memoryID) => { | ||
@@ -9,3 +9,3 @@ const data = new FormData(); | ||
data.append(fileName, fileBlob, fileName); | ||
const upload = await fetch(`${apiUrl}/Asset/${authToken}/${memoriID}${memoryID ? `/${memoryID}` : ''}`, { | ||
const upload = await fetch(`${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${memoryID ? `/${memoryID}` : ''}`, { | ||
method: 'POST', | ||
@@ -12,0 +12,0 @@ body: data, |
@@ -1,2 +0,2 @@ | ||
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs } from '../types'; | ||
import type { ResponseSpec, ImportParams, ImportResponse, CsvSpecs, JSONLSpecs } from '../types'; | ||
declare const _default: (apiUrl: string) => { | ||
@@ -19,3 +19,4 @@ importCSV: (authToken: string, memoriID: string, rows: string[], params: Omit<ImportParams, 'txtSpecs'>) => Promise<ResponseSpec & { | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: CsvSpecs, password?: string) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: JSONLSpecs, password?: string) => Promise<string>; | ||
}; | ||
export default _default; |
@@ -40,3 +40,12 @@ import { apiFetcher } from '../apiFetcher'; | ||
}), | ||
exportJSONL: async (authToken, memoriID, jsonlSpecs, password) => apiFetcher(`/ImportExport/ExportJSONL/${authToken}/${memoriID}`, { | ||
apiUrl, | ||
method: 'POST', | ||
body: { | ||
jsonlSpecs, | ||
password, | ||
}, | ||
text: true, | ||
}), | ||
}); | ||
//# sourceMappingURL=importExport.js.map |
import { apiFetcher } from '../apiFetcher'; | ||
export default (apiUrl) => ({ | ||
getTenantPublicMemoriList: (tenant) => apiFetcher(`/TenantPublicMemori/${encodeURI(tenant)}`, { | ||
getTenantPublicMemoriList: (tenant) => apiFetcher(`/TenantPublicMemori/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
}), | ||
getTenantMetaverseMemoriList: (tenant) => apiFetcher(`/TenantMetaverseMemori/${encodeURI(tenant)}`, { | ||
getTenantMetaverseMemoriList: (tenant) => apiFetcher(`/TenantMetaverseMemori/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
@@ -27,3 +27,3 @@ }), | ||
}), | ||
getTenantCategories: (tenant) => apiFetcher(`/TenantMemoriCategories/${encodeURI(tenant)}`, { | ||
getTenantCategories: (tenant) => apiFetcher(`/TenantMemoriCategories/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
@@ -55,3 +55,3 @@ }), | ||
}), | ||
getMemori: (tenant, userName, memoriName, authToken) => apiFetcher(`/Memori/${encodeURI(tenant)}/${encodeURI(userName)}/${encodeURI(memoriName)}/${authToken !== null && authToken !== void 0 ? authToken : ''}`, { | ||
getMemori: (tenant, userName, memoriName, authToken) => apiFetcher(`/Memori/${encodeURIComponent(tenant)}/${encodeURIComponent(userName)}/${encodeURIComponent(memoriName)}/${authToken !== null && authToken !== void 0 ? authToken : ''}`, { | ||
apiUrl, | ||
@@ -58,0 +58,0 @@ }), |
@@ -488,2 +488,3 @@ import * as constants from './constants'; | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
getTenantNotifications: (tenantID: string) => Promise<import("./types").ResponseSpec & { | ||
@@ -644,4 +645,4 @@ notifications: import("./types").Notification[]; | ||
memoriContentUpdated: (authToken: string, memoriID: string) => Promise<import("./types").ResponseSpec>; | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -655,4 +656,4 @@ }>; | ||
asset: { | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID: string, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
getUploadAssetURL: (authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => string; | ||
uploadAsset: (fileName: string, fileUrl: string, authToken: string, memoriID?: string | undefined, memoryID?: string | undefined) => Promise<import("./types").ResponseSpec & { | ||
asset: import("./types").Asset; | ||
@@ -850,2 +851,3 @@ }>; | ||
exportCSV: (authToken: string, memoriID: string, csvSpecs: import("./types").CsvSpecs, password?: string | undefined) => Promise<string>; | ||
exportJSONL: (authToken: string, memoriID: string, jsonlSpecs: import("./types").JSONLSpecs, password?: string | undefined) => Promise<string>; | ||
}; | ||
@@ -852,0 +854,0 @@ }; |
@@ -52,15 +52,19 @@ export declare type Error = { | ||
exposed?: boolean; | ||
ageRestriction?: number; | ||
nsfw?: boolean; | ||
disableR2R3Loop?: boolean; | ||
disableR4Loop?: boolean; | ||
disableR5Loop?: boolean; | ||
ageRestriction?: number; | ||
nsfw?: boolean; | ||
enableCompletions?: boolean; | ||
completionDescription?: string; | ||
completionProvider?: '-' | 'OpenAI'; | ||
completionProviderConfig?: string; | ||
enableDeepThought?: boolean; | ||
disableCompletionMediaExtraction?: boolean; | ||
chainingMemoriID?: string; | ||
chainingBaseURL?: string; | ||
chainingPassword?: string; | ||
properties?: { | ||
[key: string]: any; | ||
}; | ||
properties?: [{ | ||
[key: string]: string; | ||
}]; | ||
creationTimestamp?: string; | ||
@@ -110,2 +114,3 @@ lastChangeTimestamp?: string; | ||
canEditMemoriChaining?: boolean; | ||
enableBadges?: boolean; | ||
monthSessions?: number; | ||
@@ -117,2 +122,4 @@ monthValidSessions?: number; | ||
maxCompletions?: number; | ||
monthImportedSize?: number; | ||
maxImportSize?: number; | ||
creationTimestamp?: string; | ||
@@ -122,2 +129,4 @@ lastChangeTimestamp?: string; | ||
couponCode?: string; | ||
defaultCompletionProvider?: '-' | 'OpenAI'; | ||
defaultCompletionProviderConfig?: string; | ||
paying?: boolean; | ||
@@ -129,2 +138,5 @@ notificationPrefs?: NotificationPrefs[]; | ||
tnCAndPPAcceptanceDate?: string; | ||
avatarURL?: string; | ||
avatar3DURL?: string; | ||
avatar3DURLType?: string; | ||
}; | ||
@@ -512,2 +524,8 @@ export declare type IntegrationResource = { | ||
completions: number; | ||
promptTokens: { | ||
[key: string]: number; | ||
}; | ||
completionTokens: { | ||
[key: string]: number; | ||
}; | ||
}; | ||
@@ -618,2 +636,6 @@ export type Notification = { | ||
} | ||
export interface JSONLSpecs { | ||
platform?: string; | ||
includeInstructions?: boolean; | ||
} | ||
export interface ImportParams { | ||
@@ -652,2 +674,3 @@ forceImport?: boolean; | ||
importedMemories?: number; | ||
importWarningsCount?: number; | ||
importWarnings?: ImportWarning[]; | ||
@@ -654,0 +677,0 @@ } |
{ | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"name": "@memori.ai/memori-api-client", | ||
@@ -4,0 +4,0 @@ "description": "React library to integrate a Memori in your app or website", |
@@ -8,8 +8,14 @@ import { ResponseSpec, Asset } from '../types'; | ||
* @param {string} authToken - The login token | ||
* @param {string} memoriID - The memori ID | ||
* @param {string=} memoriID - The memori ID | ||
* @param {string=} memoryID - The memory ID | ||
* @returns The URL to upload a file | ||
*/ | ||
getUploadAssetURL: (authToken: string, memoriID: string, memoryID?: string) => | ||
`${apiUrl}/Asset/${authToken}/${memoriID}${memoryID ? `/${memoryID}` : ''}`, | ||
getUploadAssetURL: ( | ||
authToken: string, | ||
memoriID?: string, | ||
memoryID?: string | ||
) => | ||
`${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${ | ||
memoryID ? `/${memoryID}` : '' | ||
}`, | ||
@@ -19,3 +25,3 @@ /** | ||
* @param {string} authToken - The login token | ||
* @param {string} memoriID - The memori ID | ||
* @param {string=} memoriID - The memori ID | ||
* @param {string=} memoryID - The memory ID | ||
@@ -28,3 +34,3 @@ * @returns Response of an Upload Asset request. | ||
authToken: string, | ||
memoriID: string, | ||
memoriID?: string, | ||
memoryID?: string | ||
@@ -39,3 +45,3 @@ ) => { | ||
const upload = await fetch( | ||
`${apiUrl}/Asset/${authToken}/${memoriID}${ | ||
`${apiUrl}/Asset/${authToken}${memoriID ? `/${memoriID}` : ''}${ | ||
memoryID ? `/${memoryID}` : '' | ||
@@ -42,0 +48,0 @@ }`, |
@@ -6,2 +6,3 @@ import type { | ||
CsvSpecs, | ||
JSONLSpecs, | ||
} from '../types'; | ||
@@ -136,2 +137,26 @@ import { apiFetcher } from '../apiFetcher'; | ||
}) as Promise<string>, | ||
/** | ||
* Exports contents of a Memori object to a JSONL file, suitable for fine-tuning with generative AI platforms. | ||
* @param {string} authToken - The login token. | ||
* @param {string} memoriID - The ID of the Memori object. | ||
* @param {JSONLSpecs} jsonlSpecs - Specifications for requests involving import/export of JSONL contents. | ||
* @param {string=} password - Memori password, if its privacy model is set to Secret. | ||
* @returns The JSONL file content | ||
*/ | ||
exportJSONL: async ( | ||
authToken: string, | ||
memoriID: string, | ||
jsonlSpecs: JSONLSpecs, | ||
password?: string | ||
) => | ||
apiFetcher(`/ImportExport/ExportJSONL/${authToken}/${memoriID}`, { | ||
apiUrl, | ||
method: 'POST', | ||
body: { | ||
jsonlSpecs, | ||
password, | ||
}, | ||
text: true, | ||
}) as Promise<string>, | ||
}); |
@@ -11,3 +11,3 @@ import { ResponseSpec, Memori, MemoriConfig } from '../types'; | ||
getTenantPublicMemoriList: (tenant: string) => | ||
apiFetcher(`/TenantPublicMemori/${encodeURI(tenant)}`, { | ||
apiFetcher(`/TenantPublicMemori/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
@@ -26,3 +26,3 @@ }) as Promise< | ||
getTenantMetaverseMemoriList: (tenant: string) => | ||
apiFetcher(`/TenantMetaverseMemori/${encodeURI(tenant)}`, { | ||
apiFetcher(`/TenantMetaverseMemori/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
@@ -147,3 +147,3 @@ }) as Promise< | ||
getTenantCategories: (tenant: string) => | ||
apiFetcher(`/TenantMemoriCategories/${encodeURI(tenant)}`, { | ||
apiFetcher(`/TenantMemoriCategories/${encodeURIComponent(tenant)}`, { | ||
apiUrl, | ||
@@ -259,5 +259,5 @@ }) as Promise< | ||
apiFetcher( | ||
`/Memori/${encodeURI(tenant)}/${encodeURI(userName)}/${encodeURI( | ||
memoriName | ||
)}/${authToken ?? ''}`, | ||
`/Memori/${encodeURIComponent(tenant)}/${encodeURIComponent( | ||
userName | ||
)}/${encodeURIComponent(memoriName)}/${authToken ?? ''}`, | ||
{ | ||
@@ -264,0 +264,0 @@ apiUrl, |
@@ -63,13 +63,26 @@ export declare type Error = { | ||
exposed?: boolean; | ||
ageRestriction?: number; | ||
nsfw?: boolean; | ||
disableR2R3Loop?: boolean; | ||
disableR4Loop?: boolean; | ||
disableR5Loop?: boolean; | ||
ageRestriction?: number; | ||
nsfw?: boolean; | ||
enableCompletions?: boolean; | ||
completionDescription?: string; | ||
completionProvider?: '-' | 'OpenAI'; | ||
/** | ||
* Format: chiave1:valore1|chiave2:valore2|...|chiaveN:valoreN | ||
* | ||
* OpenAI accetta i seguenti: | ||
* - APIKey è l'API key | ||
* - Model è il nome del modello: gpt-3.5-turbo, gpt-4 ecc. | ||
* - MaxTokens è il numero massimo di token in output | ||
* - Temperature è la temperature | ||
*/ | ||
completionProviderConfig?: string; | ||
enableDeepThought?: boolean; | ||
disableCompletionMediaExtraction?: boolean; | ||
chainingMemoriID?: string; | ||
chainingBaseURL?: string; | ||
chainingPassword?: string; | ||
properties?: { [key: string]: any }; | ||
properties?: [{ [key: string]: string }]; | ||
creationTimestamp?: string; | ||
@@ -142,2 +155,3 @@ lastChangeTimestamp?: string; | ||
canEditMemoriChaining?: boolean; | ||
enableBadges?: boolean; | ||
monthSessions?: number; | ||
@@ -149,2 +163,4 @@ monthValidSessions?: number; | ||
maxCompletions?: number; | ||
monthImportedSize?: number; | ||
maxImportSize?: number; | ||
creationTimestamp?: string; | ||
@@ -154,2 +170,13 @@ lastChangeTimestamp?: string; | ||
couponCode?: string; | ||
defaultCompletionProvider?: '-' | 'OpenAI'; | ||
/** | ||
* Format: chiave1:valore1|chiave2:valore2|...|chiaveN:valoreN | ||
* | ||
* OpenAI accetta i seguenti: | ||
* - APIKey è l'API key | ||
* - Model è il nome del modello: gpt-3.5-turbo, gpt-4 ecc. | ||
* - MaxTokens è il numero massimo di token in output | ||
* - Temperature è la temperature | ||
*/ | ||
defaultCompletionProviderConfig?: string; | ||
paying?: boolean; | ||
@@ -161,2 +188,5 @@ notificationPrefs?: NotificationPrefs[]; | ||
tnCAndPPAcceptanceDate?: string; | ||
avatarURL?: string; | ||
avatar3DURL?: string; | ||
avatar3DURLType?: string; | ||
}; | ||
@@ -576,2 +606,4 @@ | ||
completions: number; | ||
promptTokens: { [key: string]: number }; | ||
completionTokens: { [key: string]: number }; | ||
}; | ||
@@ -916,2 +948,17 @@ | ||
export interface JSONLSpecs { | ||
/** | ||
* @type {string=} | ||
* Name of the platform for which the JSONL is intended. | ||
* Currently supported values are: | ||
* - OpenAI: the OpenAI platform | ||
*/ | ||
platform?: string; | ||
/** | ||
* @type {boolean=} | ||
* If True the JSONL includes the instructions for the generative AI, i.e. the "System" role of each message. Used only in Export operations. | ||
*/ | ||
includeInstructions?: boolean; | ||
} | ||
export interface ImportParams { | ||
@@ -1017,2 +1064,6 @@ forceImport?: boolean; | ||
/** | ||
* Number of Import Warning objects | ||
*/ | ||
importWarningsCount?: number; | ||
/** | ||
* List of Import Warning objects. May be empty. | ||
@@ -1019,0 +1070,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
669458
12825
0