feat(ts-sdk): add support for keyword arguments in add and search methods (#3895)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mem0ai",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"description": "The Memory Layer For Your AI Apps",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
|
||||
@@ -213,7 +213,7 @@ export default class MemoryClient {
|
||||
|
||||
async add(
|
||||
messages: Array<Message>,
|
||||
options: MemoryOptions = {},
|
||||
options: MemoryOptions & Record<string, any> = {},
|
||||
): Promise<Array<Memory>> {
|
||||
if (this.telemetryId === "") await this.ping();
|
||||
this._validateOrgProject();
|
||||
@@ -339,7 +339,10 @@ export default class MemoryClient {
|
||||
}
|
||||
}
|
||||
|
||||
async search(query: string, options?: SearchOptions): Promise<Array<Memory>> {
|
||||
async search(
|
||||
query: string,
|
||||
options?: SearchOptions & Record<string, any>,
|
||||
): Promise<Array<Memory>> {
|
||||
if (this.telemetryId === "") await this.ping();
|
||||
this._validateOrgProject();
|
||||
const payloadKeys = Object.keys(options || {});
|
||||
|
||||
Reference in New Issue
Block a user