comemo 1.0.0 → 1.0.1
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 +0 -12
- package/dist/client.js +3 -8
- package/dist/types.d.ts +0 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,18 +26,6 @@ const client = new MemoryClient({
|
|
|
26
26
|
});
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Optional fields:
|
|
30
|
-
|
|
31
|
-
```ts
|
|
32
|
-
const client = new MemoryClient({
|
|
33
|
-
...,
|
|
34
|
-
pineconeNamespace: "tenant-a", // Multi-tenant within one Pinecone index
|
|
35
|
-
neo4jDatabase: "mydb", // Neo4j database name (defaults to "neo4j")
|
|
36
|
-
baseUrl: "https://xvert.io", // API base URL
|
|
37
|
-
timeout: 30000, // Request timeout in ms
|
|
38
|
-
});
|
|
39
|
-
```
|
|
40
|
-
|
|
41
29
|
### Core Memory
|
|
42
30
|
|
|
43
31
|
```ts
|
package/dist/client.js
CHANGED
|
@@ -35,10 +35,10 @@ class MemoryClient {
|
|
|
35
35
|
* @param options - Client configuration options including tenant credentials.
|
|
36
36
|
*/
|
|
37
37
|
constructor(options) {
|
|
38
|
-
this.baseUrl =
|
|
39
|
-
this.timeout =
|
|
38
|
+
this.baseUrl = "https://xvert.io";
|
|
39
|
+
this.timeout = 30000;
|
|
40
40
|
// Tenant config sent with every request
|
|
41
|
-
|
|
41
|
+
this.config = {
|
|
42
42
|
llm_api_key: options.llmApiKey,
|
|
43
43
|
model: options.model ?? "gpt-4o-mini",
|
|
44
44
|
pinecone_api_key: options.pineconeApiKey,
|
|
@@ -47,11 +47,6 @@ class MemoryClient {
|
|
|
47
47
|
neo4j_username: options.neo4jUsername,
|
|
48
48
|
neo4j_password: options.neo4jPassword,
|
|
49
49
|
};
|
|
50
|
-
if (options.pineconeNamespace)
|
|
51
|
-
cfg.pinecone_namespace = options.pineconeNamespace;
|
|
52
|
-
if (options.neo4jDatabase)
|
|
53
|
-
cfg.neo4j_database = options.neo4jDatabase;
|
|
54
|
-
this.config = cfg;
|
|
55
50
|
}
|
|
56
51
|
async request(method, path, options = {}) {
|
|
57
52
|
let url = `${this.baseUrl}${path}`;
|
package/dist/types.d.ts
CHANGED
|
@@ -8,16 +8,12 @@ export interface TenantConfig {
|
|
|
8
8
|
pineconeApiKey: string;
|
|
9
9
|
/** Pinecone index name. */
|
|
10
10
|
pineconeIndex: string;
|
|
11
|
-
/** Pinecone namespace (for multi-tenant within one index). */
|
|
12
|
-
pineconeNamespace?: string;
|
|
13
11
|
/** Neo4j connection URI (e.g. "neo4j+s://xxx.databases.neo4j.io"). */
|
|
14
12
|
neo4jUri: string;
|
|
15
13
|
/** Neo4j username. */
|
|
16
14
|
neo4jUsername: string;
|
|
17
15
|
/** Neo4j password. */
|
|
18
16
|
neo4jPassword: string;
|
|
19
|
-
/** Neo4j database name (defaults to "neo4j"). */
|
|
20
|
-
neo4jDatabase?: string;
|
|
21
17
|
}
|
|
22
18
|
/** Result of adding a memory. */
|
|
23
19
|
export interface AddMemoryResult {
|
|
@@ -91,10 +87,6 @@ export interface HealthResult {
|
|
|
91
87
|
}
|
|
92
88
|
/** Options for the MemoryClient constructor. */
|
|
93
89
|
export interface MemoryClientOptions extends TenantConfig {
|
|
94
|
-
/** Base URL of the API. Defaults to "https://xvert.io". */
|
|
95
|
-
baseUrl?: string;
|
|
96
|
-
/** Request timeout in milliseconds. Defaults to 30000. */
|
|
97
|
-
timeout?: number;
|
|
98
90
|
}
|
|
99
91
|
/** Options for advanced retrieval. */
|
|
100
92
|
export interface RetrieveAdvancedOptions {
|