@@ -111,6 +111,8 @@ class Chroma_VectorStores implements INode {
111
111
112
112
const credentialData = await getCredentialData ( nodeData . credential ?? '' , options )
113
113
const chromaApiKey = getCredentialParam ( 'chromaApiKey' , credentialData , nodeData )
114
+ const chromaTenant = getCredentialParam ( 'chromaTenant' , credentialData , nodeData )
115
+ const chromaDatabase = getCredentialParam ( 'chromaDatabase' , credentialData , nodeData )
114
116
115
117
const flattenDocs = docs && docs . length ? flatten ( docs ) : [ ]
116
118
const finalDocs = [ ]
@@ -124,9 +126,13 @@ class Chroma_VectorStores implements INode {
124
126
collectionName : string
125
127
url ?: string
126
128
chromaApiKey ?: string
129
+ chromaTenant ?: string
130
+ chromaDatabase ?: string
127
131
} = { collectionName }
128
132
if ( chromaURL ) obj . url = chromaURL
129
133
if ( chromaApiKey ) obj . chromaApiKey = chromaApiKey
134
+ if ( chromaTenant ) obj . chromaTenant = chromaTenant
135
+ if ( chromaDatabase ) obj . chromaDatabase = chromaDatabase
130
136
131
137
try {
132
138
if ( recordManager ) {
@@ -159,14 +165,20 @@ class Chroma_VectorStores implements INode {
159
165
160
166
const credentialData = await getCredentialData ( nodeData . credential ?? '' , options )
161
167
const chromaApiKey = getCredentialParam ( 'chromaApiKey' , credentialData , nodeData )
168
+ const chromaTenant = getCredentialParam ( 'chromaTenant' , credentialData , nodeData )
169
+ const chromaDatabase = getCredentialParam ( 'chromaDatabase' , credentialData , nodeData )
162
170
163
171
const obj : {
164
172
collectionName : string
165
173
url ?: string
166
174
chromaApiKey ?: string
175
+ chromaTenant ?: string
176
+ chromaDatabase ?: string
167
177
} = { collectionName }
168
178
if ( chromaURL ) obj . url = chromaURL
169
179
if ( chromaApiKey ) obj . chromaApiKey = chromaApiKey
180
+ if ( chromaTenant ) obj . chromaTenant = chromaTenant
181
+ if ( chromaDatabase ) obj . chromaDatabase = chromaDatabase
170
182
171
183
try {
172
184
if ( recordManager ) {
@@ -199,17 +211,23 @@ class Chroma_VectorStores implements INode {
199
211
200
212
const credentialData = await getCredentialData ( nodeData . credential ?? '' , options )
201
213
const chromaApiKey = getCredentialParam ( 'chromaApiKey' , credentialData , nodeData )
214
+ const chromaTenant = getCredentialParam ( 'chromaTenant' , credentialData , nodeData )
215
+ const chromaDatabase = getCredentialParam ( 'chromaDatabase' , credentialData , nodeData )
202
216
203
217
const chromaMetadataFilter = nodeData . inputs ?. chromaMetadataFilter
204
218
205
219
const obj : {
206
220
collectionName : string
207
221
url ?: string
208
222
chromaApiKey ?: string
223
+ chromaTenant ?: string
224
+ chromaDatabase ?: string
209
225
filter ?: object | undefined
210
226
} = { collectionName }
211
227
if ( chromaURL ) obj . url = chromaURL
212
228
if ( chromaApiKey ) obj . chromaApiKey = chromaApiKey
229
+ if ( chromaTenant ) obj . chromaTenant = chromaTenant
230
+ if ( chromaDatabase ) obj . chromaDatabase = chromaDatabase
213
231
if ( chromaMetadataFilter ) {
214
232
const metadatafilter = typeof chromaMetadataFilter === 'object' ? chromaMetadataFilter : JSON . parse ( chromaMetadataFilter )
215
233
obj . filter = metadatafilter
0 commit comments