Delete Memory langbase.memory.delete()
Delete an AI memory on Langbase using the langbase.memory.delete()
function.
Generate a User/Org API key
You will need to generate an API key to authenticate your requests. For more information, visit the User/Org API key documentation.
API reference
langbase.memory.delete(options)
Function Signature
langbase.memory.delete(options);
// with types.
langbase.memory.delete(options: MemoryDeleteOptions);
options
- Name
options
- Type
- MemoryDeleteOptions
- Description
MemoryDeleteOptions Object
interface MemoryDeleteOptions { name: string; }
Following are the properties of the options object.
- Name
name
- Type
- string
- Required
- Required
- Description
Name of the AI memory to delete.
Usage example
Install the SDK
npm i langbase
Environment variables
.env file
LANGBASE_API_KEY="<USER/ORG-API-KEY>"
Delete memory
Delete memory on Langbase
import {Langbase} from 'langbase';
const langbase = new Langbase({
apiKey: process.env.LANGBASE_API_KEY!,
});
const response = await langbase.memory.delete({
name: 'knowledge-base'
});
Response
- Name
MemoryDeleteResponse
- Type
- object
- Description
The response object returned by the
langbase.memory.delete()
function.MemoryDeleteResponse
interface MemoryDeleteResponse { success: boolean; }
- Name
success
- Type
- boolean
- Description
Indicates whether the deletion was successful.
Response of langbase.memory.delete()
{
"success": true
}