@oracle/langchain-oracledb 0.2.0 → 1.1.0
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 +62 -1
- package/dist/cache.cjs +535 -0
- package/dist/cache.cjs.map +1 -0
- package/dist/cache.d.cts +168 -0
- package/dist/cache.d.ts +168 -0
- package/dist/cache.js +527 -0
- package/dist/cache.js.map +1 -0
- package/dist/chatMessageHistories.cjs +345 -0
- package/dist/chatMessageHistories.cjs.map +1 -0
- package/dist/chatMessageHistories.d.cts +107 -0
- package/dist/chatMessageHistories.d.ts +107 -0
- package/dist/chatMessageHistories.js +338 -0
- package/dist/chatMessageHistories.js.map +1 -0
- package/dist/document_loaders.cjs +4 -3
- package/dist/document_loaders.cjs.map +1 -1
- package/dist/document_loaders.js +4 -3
- package/dist/document_loaders.js.map +1 -1
- package/dist/errors.cjs +123 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +57 -0
- package/dist/errors.d.ts +57 -0
- package/dist/errors.js +113 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/utils.cjs +49 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.d.cts +5 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +44 -0
- package/dist/utils.js.map +1 -0
- package/dist/vectorstores.cjs +156 -108
- package/dist/vectorstores.cjs.map +1 -1
- package/dist/vectorstores.d.cts +11 -3
- package/dist/vectorstores.d.ts +11 -3
- package/dist/vectorstores.js +137 -91
- package/dist/vectorstores.js.map +1 -1
- package/package.json +27 -26
package/dist/cache.d.cts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { Generation } from "@langchain/core/outputs";
|
|
2
|
+
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
|
|
3
|
+
import { BaseCache } from "@langchain/core/caches";
|
|
4
|
+
import { OracleDBVSArgs, IndexParams } from "./vectorstores.js";
|
|
5
|
+
import { OracleDBClient, OracleDBClientProvider } from "./utils.js";
|
|
6
|
+
export type OracleSemanticCacheDBConfig = Omit<OracleDBVSArgs, "tableName"> & {
|
|
7
|
+
tableName?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface OracleSemanticCacheOptions {
|
|
10
|
+
createIndexIfMissing?: boolean;
|
|
11
|
+
indexName?: string;
|
|
12
|
+
indexParams?: IndexParams;
|
|
13
|
+
scoreThreshold?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface OracleCacheClearOptions {
|
|
16
|
+
prompt?: string;
|
|
17
|
+
llmKey?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Caches model generations in Oracle Database using vector similarity between prompts.
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* // `embeddings` is an EmbeddingsInterface and `pool` is an Oracle connection pool.
|
|
24
|
+
* const cache = new OracleSemanticCache(embeddings, { client: pool }, {
|
|
25
|
+
* scoreThreshold: 0.2,
|
|
26
|
+
* createIndexIfMissing: true,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class OracleSemanticCache extends BaseCache {
|
|
31
|
+
private readonly vectorStore;
|
|
32
|
+
readonly createIndexIfMissing?: boolean;
|
|
33
|
+
readonly indexName?: string;
|
|
34
|
+
readonly indexParams?: IndexParams;
|
|
35
|
+
readonly scoreThreshold?: number;
|
|
36
|
+
private readonly LLM_HASH;
|
|
37
|
+
private readonly PROMPT_HASH;
|
|
38
|
+
private readonly RETURN_VAL;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a semantic cache instance without performing database setup.
|
|
41
|
+
*
|
|
42
|
+
* @param {EmbeddingsInterface} embeddings Embedding model used to vectorize prompts.
|
|
43
|
+
* @param {OracleSemanticCacheDBConfig} dbConfig Oracle vector-store configuration.
|
|
44
|
+
* @param {OracleDBClient | OracleDBClientProvider} dbConfig.client Connection, pool, or async provider to use.
|
|
45
|
+
* @param {string} dbConfig.tableName Cache table name. Defaults to `langchain_semantic_cache`.
|
|
46
|
+
*
|
|
47
|
+
* @param {OracleSemanticCacheOptions} options Optional index and distance threshold settings.
|
|
48
|
+
* @param {boolean} options.createIndexIfMissing Whether initialize() creates a vector index
|
|
49
|
+
* if it does not exist. Defaults to `false`.
|
|
50
|
+
* @param {number} options.scoreThreshold Maximum vector distance accepted for a cache hit.
|
|
51
|
+
* Lower distance values indicate closer matches.
|
|
52
|
+
*
|
|
53
|
+
* @throws If the client is missing, the table identifier is invalid,
|
|
54
|
+
* or the distance threshold is negative.
|
|
55
|
+
*/
|
|
56
|
+
constructor(embeddings: EmbeddingsInterface, dbConfig: OracleSemanticCacheDBConfig, options?: OracleSemanticCacheOptions);
|
|
57
|
+
/**
|
|
58
|
+
* Initializes the underlying vector store and creates the optional vector index.
|
|
59
|
+
* @returns Promise that resolves when database setup completes.
|
|
60
|
+
*/
|
|
61
|
+
initialize(): Promise<void>;
|
|
62
|
+
private cacheEntryId;
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves the nearest cached response for the given model configuration key.
|
|
65
|
+
* @param {string} prompt Prompt to embed and search for.
|
|
66
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
67
|
+
* @returns Cached generations, or `null` when no match passes the threshold or the payload is malformed.
|
|
68
|
+
* @throws If search fails or deserialization encounters an unexpected error.
|
|
69
|
+
*/
|
|
70
|
+
lookup(prompt: string, llmKey: string): Promise<Generation[] | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Inserts or updates the entry for an exact prompt and model configuration key.
|
|
73
|
+
* Skips the entire update if any generation contains valid or invalid tool calls,
|
|
74
|
+
* avoiding reuse of procedural responses within an agent loop.
|
|
75
|
+
* @param {string} prompt Prompt to embed and store.
|
|
76
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
77
|
+
* @param {Generation[]} value Model generations to cache.
|
|
78
|
+
* @returns Promise that resolves when the write completes or the update is skipped.
|
|
79
|
+
*/
|
|
80
|
+
update(prompt: string, llmKey: string, value: Generation[]): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Deletes entries matching all supplied exact filters, without similarity search.
|
|
83
|
+
* With no filters, deletes every entry in the table.
|
|
84
|
+
* @param {OracleCacheClearOptions} options Optional prompt and model configuration filters.
|
|
85
|
+
* @param {string} options.prompt Optional prompt to match exactly.
|
|
86
|
+
* @param {string} options.llmKey Optional model configuration key to match exactly.
|
|
87
|
+
* @returns Promise that resolves when deletion has been committed.
|
|
88
|
+
* @throws If an unsupported filter is supplied or deletion fails.
|
|
89
|
+
*/
|
|
90
|
+
clear(options?: OracleCacheClearOptions): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Drops and purges the semantic cache table if it exists, removing all entries.
|
|
93
|
+
* @param {OracleDBClient | OracleDBClientProvider} client Connection, pool, or async provider to use.
|
|
94
|
+
* @param {string} tableName Table to drop. Defaults to `langchain_semantic_cache`.
|
|
95
|
+
* @returns Promise that resolves when the table has been dropped or does not exist.
|
|
96
|
+
*/
|
|
97
|
+
static dropTable(client: OracleDBClient | OracleDBClientProvider, tableName?: string): Promise<void>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Caches model generations by exact prompt and model configuration key in Oracle Database.
|
|
101
|
+
* Lookup uses a hashed primary key and does not require an embedding model.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* // `pool` is an Oracle connection pool.
|
|
106
|
+
* const cache = new OracleCache(pool);
|
|
107
|
+
* await cache.initialize();
|
|
108
|
+
* await cache.update("Hello", "model-config", [{ text: "Hi!" }]);
|
|
109
|
+
* const generations = await cache.lookup("Hello", "model-config");
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export declare class OracleCache extends BaseCache {
|
|
113
|
+
readonly client: OracleDBClient | OracleDBClientProvider;
|
|
114
|
+
readonly tableName: string;
|
|
115
|
+
private readonly quotedTableName;
|
|
116
|
+
/**
|
|
117
|
+
* Creates an exact cache instance without performing database setup.
|
|
118
|
+
* @param {OracleDBClient | OracleDBClientProvider} client Connection, pool, or async provider to use.
|
|
119
|
+
* @param {string} tableName Cache table name. Defaults to `langchain_exact_cache`.
|
|
120
|
+
* @throws If the client is missing or the table identifier is invalid.
|
|
121
|
+
*/
|
|
122
|
+
constructor(client: OracleDBClient | OracleDBClientProvider, tableName?: string);
|
|
123
|
+
/**
|
|
124
|
+
* Creates the cache table if it does not already exist.
|
|
125
|
+
* @returns Promise that resolves when database setup completes.
|
|
126
|
+
*/
|
|
127
|
+
initialize(): Promise<void>;
|
|
128
|
+
/** Stores serialized generations in a CLOB, with separate hashes for filtered deletion. */
|
|
129
|
+
private ensureTable;
|
|
130
|
+
private encodeKey;
|
|
131
|
+
private cacheEntryId;
|
|
132
|
+
/**
|
|
133
|
+
* Retrieves the cached response for an exact prompt and model configuration key.
|
|
134
|
+
* Restored chat message IDs are cleared before returning the generations.
|
|
135
|
+
* @param {string} prompt Exact prompt used when writing the entry.
|
|
136
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
137
|
+
* @returns Cached generations, or `null` when the entry is absent or its payload is malformed.
|
|
138
|
+
* @throws If the query fails or deserialization encounters an unexpected error.
|
|
139
|
+
*/
|
|
140
|
+
lookup(prompt: string, llmKey: string): Promise<Generation[] | null>;
|
|
141
|
+
/**
|
|
142
|
+
* Inserts or replaces generations for an exact prompt and model configuration key.
|
|
143
|
+
* Skips the entire update if any generation contains valid or invalid tool calls.
|
|
144
|
+
* Successful writes commit the connection's transaction.
|
|
145
|
+
* @param {string} prompt Prompt used to identify the entry.
|
|
146
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
147
|
+
* @param {Generation[]} value Model generations to cache.
|
|
148
|
+
* @returns Promise that resolves when the write is committed or the update is skipped.
|
|
149
|
+
*/
|
|
150
|
+
update(prompt: string, llmKey: string, value: Generation[]): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Deletes entries matching all supplied exact-match filters.
|
|
153
|
+
* With no filters, deletes every entry in the table. Commits the connection's transaction.
|
|
154
|
+
* @param {OracleCacheClearOptions} options Optional prompt and model configuration filters.
|
|
155
|
+
* @param {string} options.prompt Optional prompt to match exactly.
|
|
156
|
+
* @param {string} options.llmKey Optional model configuration key to match exactly.
|
|
157
|
+
* @returns Promise that resolves when deletion has been committed.
|
|
158
|
+
* @throws If an unsupported filter is supplied or deletion fails.
|
|
159
|
+
*/
|
|
160
|
+
clear(options?: OracleCacheClearOptions): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Drops and purges the exact cache table if it exists, removing all entries.
|
|
163
|
+
* @param {OracleDBClient | OracleDBClientProvider} client Connection, pool, or async provider to use.
|
|
164
|
+
* @param {string} tableName Table to drop. Defaults to `langchain_exact_cache`.
|
|
165
|
+
* @returns Promise that resolves when the table has been dropped or does not exist.
|
|
166
|
+
*/
|
|
167
|
+
static dropTable(client: OracleDBClient | OracleDBClientProvider, tableName?: string): Promise<void>;
|
|
168
|
+
}
|
package/dist/cache.d.ts
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import type { Generation } from "@langchain/core/outputs";
|
|
2
|
+
import type { EmbeddingsInterface } from "@langchain/core/embeddings";
|
|
3
|
+
import { BaseCache } from "@langchain/core/caches";
|
|
4
|
+
import { OracleDBVSArgs, IndexParams } from "./vectorstores.js";
|
|
5
|
+
import { OracleDBClient, OracleDBClientProvider } from "./utils.js";
|
|
6
|
+
export type OracleSemanticCacheDBConfig = Omit<OracleDBVSArgs, "tableName"> & {
|
|
7
|
+
tableName?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface OracleSemanticCacheOptions {
|
|
10
|
+
createIndexIfMissing?: boolean;
|
|
11
|
+
indexName?: string;
|
|
12
|
+
indexParams?: IndexParams;
|
|
13
|
+
scoreThreshold?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface OracleCacheClearOptions {
|
|
16
|
+
prompt?: string;
|
|
17
|
+
llmKey?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Caches model generations in Oracle Database using vector similarity between prompts.
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* // `embeddings` is an EmbeddingsInterface and `pool` is an Oracle connection pool.
|
|
24
|
+
* const cache = new OracleSemanticCache(embeddings, { client: pool }, {
|
|
25
|
+
* scoreThreshold: 0.2,
|
|
26
|
+
* createIndexIfMissing: true,
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare class OracleSemanticCache extends BaseCache {
|
|
31
|
+
private readonly vectorStore;
|
|
32
|
+
readonly createIndexIfMissing?: boolean;
|
|
33
|
+
readonly indexName?: string;
|
|
34
|
+
readonly indexParams?: IndexParams;
|
|
35
|
+
readonly scoreThreshold?: number;
|
|
36
|
+
private readonly LLM_HASH;
|
|
37
|
+
private readonly PROMPT_HASH;
|
|
38
|
+
private readonly RETURN_VAL;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a semantic cache instance without performing database setup.
|
|
41
|
+
*
|
|
42
|
+
* @param {EmbeddingsInterface} embeddings Embedding model used to vectorize prompts.
|
|
43
|
+
* @param {OracleSemanticCacheDBConfig} dbConfig Oracle vector-store configuration.
|
|
44
|
+
* @param {OracleDBClient | OracleDBClientProvider} dbConfig.client Connection, pool, or async provider to use.
|
|
45
|
+
* @param {string} dbConfig.tableName Cache table name. Defaults to `langchain_semantic_cache`.
|
|
46
|
+
*
|
|
47
|
+
* @param {OracleSemanticCacheOptions} options Optional index and distance threshold settings.
|
|
48
|
+
* @param {boolean} options.createIndexIfMissing Whether initialize() creates a vector index
|
|
49
|
+
* if it does not exist. Defaults to `false`.
|
|
50
|
+
* @param {number} options.scoreThreshold Maximum vector distance accepted for a cache hit.
|
|
51
|
+
* Lower distance values indicate closer matches.
|
|
52
|
+
*
|
|
53
|
+
* @throws If the client is missing, the table identifier is invalid,
|
|
54
|
+
* or the distance threshold is negative.
|
|
55
|
+
*/
|
|
56
|
+
constructor(embeddings: EmbeddingsInterface, dbConfig: OracleSemanticCacheDBConfig, options?: OracleSemanticCacheOptions);
|
|
57
|
+
/**
|
|
58
|
+
* Initializes the underlying vector store and creates the optional vector index.
|
|
59
|
+
* @returns Promise that resolves when database setup completes.
|
|
60
|
+
*/
|
|
61
|
+
initialize(): Promise<void>;
|
|
62
|
+
private cacheEntryId;
|
|
63
|
+
/**
|
|
64
|
+
* Retrieves the nearest cached response for the given model configuration key.
|
|
65
|
+
* @param {string} prompt Prompt to embed and search for.
|
|
66
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
67
|
+
* @returns Cached generations, or `null` when no match passes the threshold or the payload is malformed.
|
|
68
|
+
* @throws If search fails or deserialization encounters an unexpected error.
|
|
69
|
+
*/
|
|
70
|
+
lookup(prompt: string, llmKey: string): Promise<Generation[] | null>;
|
|
71
|
+
/**
|
|
72
|
+
* Inserts or updates the entry for an exact prompt and model configuration key.
|
|
73
|
+
* Skips the entire update if any generation contains valid or invalid tool calls,
|
|
74
|
+
* avoiding reuse of procedural responses within an agent loop.
|
|
75
|
+
* @param {string} prompt Prompt to embed and store.
|
|
76
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
77
|
+
* @param {Generation[]} value Model generations to cache.
|
|
78
|
+
* @returns Promise that resolves when the write completes or the update is skipped.
|
|
79
|
+
*/
|
|
80
|
+
update(prompt: string, llmKey: string, value: Generation[]): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Deletes entries matching all supplied exact filters, without similarity search.
|
|
83
|
+
* With no filters, deletes every entry in the table.
|
|
84
|
+
* @param {OracleCacheClearOptions} options Optional prompt and model configuration filters.
|
|
85
|
+
* @param {string} options.prompt Optional prompt to match exactly.
|
|
86
|
+
* @param {string} options.llmKey Optional model configuration key to match exactly.
|
|
87
|
+
* @returns Promise that resolves when deletion has been committed.
|
|
88
|
+
* @throws If an unsupported filter is supplied or deletion fails.
|
|
89
|
+
*/
|
|
90
|
+
clear(options?: OracleCacheClearOptions): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Drops and purges the semantic cache table if it exists, removing all entries.
|
|
93
|
+
* @param {OracleDBClient | OracleDBClientProvider} client Connection, pool, or async provider to use.
|
|
94
|
+
* @param {string} tableName Table to drop. Defaults to `langchain_semantic_cache`.
|
|
95
|
+
* @returns Promise that resolves when the table has been dropped or does not exist.
|
|
96
|
+
*/
|
|
97
|
+
static dropTable(client: OracleDBClient | OracleDBClientProvider, tableName?: string): Promise<void>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Caches model generations by exact prompt and model configuration key in Oracle Database.
|
|
101
|
+
* Lookup uses a hashed primary key and does not require an embedding model.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* // `pool` is an Oracle connection pool.
|
|
106
|
+
* const cache = new OracleCache(pool);
|
|
107
|
+
* await cache.initialize();
|
|
108
|
+
* await cache.update("Hello", "model-config", [{ text: "Hi!" }]);
|
|
109
|
+
* const generations = await cache.lookup("Hello", "model-config");
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
export declare class OracleCache extends BaseCache {
|
|
113
|
+
readonly client: OracleDBClient | OracleDBClientProvider;
|
|
114
|
+
readonly tableName: string;
|
|
115
|
+
private readonly quotedTableName;
|
|
116
|
+
/**
|
|
117
|
+
* Creates an exact cache instance without performing database setup.
|
|
118
|
+
* @param {OracleDBClient | OracleDBClientProvider} client Connection, pool, or async provider to use.
|
|
119
|
+
* @param {string} tableName Cache table name. Defaults to `langchain_exact_cache`.
|
|
120
|
+
* @throws If the client is missing or the table identifier is invalid.
|
|
121
|
+
*/
|
|
122
|
+
constructor(client: OracleDBClient | OracleDBClientProvider, tableName?: string);
|
|
123
|
+
/**
|
|
124
|
+
* Creates the cache table if it does not already exist.
|
|
125
|
+
* @returns Promise that resolves when database setup completes.
|
|
126
|
+
*/
|
|
127
|
+
initialize(): Promise<void>;
|
|
128
|
+
/** Stores serialized generations in a CLOB, with separate hashes for filtered deletion. */
|
|
129
|
+
private ensureTable;
|
|
130
|
+
private encodeKey;
|
|
131
|
+
private cacheEntryId;
|
|
132
|
+
/**
|
|
133
|
+
* Retrieves the cached response for an exact prompt and model configuration key.
|
|
134
|
+
* Restored chat message IDs are cleared before returning the generations.
|
|
135
|
+
* @param {string} prompt Exact prompt used when writing the entry.
|
|
136
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
137
|
+
* @returns Cached generations, or `null` when the entry is absent or its payload is malformed.
|
|
138
|
+
* @throws If the query fails or deserialization encounters an unexpected error.
|
|
139
|
+
*/
|
|
140
|
+
lookup(prompt: string, llmKey: string): Promise<Generation[] | null>;
|
|
141
|
+
/**
|
|
142
|
+
* Inserts or replaces generations for an exact prompt and model configuration key.
|
|
143
|
+
* Skips the entire update if any generation contains valid or invalid tool calls.
|
|
144
|
+
* Successful writes commit the connection's transaction.
|
|
145
|
+
* @param {string} prompt Prompt used to identify the entry.
|
|
146
|
+
* @param {string} llmKey Key identifying the model and its configuration.
|
|
147
|
+
* @param {Generation[]} value Model generations to cache.
|
|
148
|
+
* @returns Promise that resolves when the write is committed or the update is skipped.
|
|
149
|
+
*/
|
|
150
|
+
update(prompt: string, llmKey: string, value: Generation[]): Promise<void>;
|
|
151
|
+
/**
|
|
152
|
+
* Deletes entries matching all supplied exact-match filters.
|
|
153
|
+
* With no filters, deletes every entry in the table. Commits the connection's transaction.
|
|
154
|
+
* @param {OracleCacheClearOptions} options Optional prompt and model configuration filters.
|
|
155
|
+
* @param {string} options.prompt Optional prompt to match exactly.
|
|
156
|
+
* @param {string} options.llmKey Optional model configuration key to match exactly.
|
|
157
|
+
* @returns Promise that resolves when deletion has been committed.
|
|
158
|
+
* @throws If an unsupported filter is supplied or deletion fails.
|
|
159
|
+
*/
|
|
160
|
+
clear(options?: OracleCacheClearOptions): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Drops and purges the exact cache table if it exists, removing all entries.
|
|
163
|
+
* @param {OracleDBClient | OracleDBClientProvider} client Connection, pool, or async provider to use.
|
|
164
|
+
* @param {string} tableName Table to drop. Defaults to `langchain_exact_cache`.
|
|
165
|
+
* @returns Promise that resolves when the table has been dropped or does not exist.
|
|
166
|
+
*/
|
|
167
|
+
static dropTable(client: OracleDBClient | OracleDBClientProvider, tableName?: string): Promise<void>;
|
|
168
|
+
}
|