@devilsdev/rag-connectors 3.7.0 → 3.8.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/dist/index.cjs +3 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1372,7 +1372,7 @@ var require_qdrant_retriever = __commonJS({
|
|
|
1372
1372
|
if (typeof fetchImpl !== "function") {
|
|
1373
1373
|
throw new Error("QdrantRetriever needs fetch (Node.js 18 or later)");
|
|
1374
1374
|
}
|
|
1375
|
-
this.url = String(url).replace(
|
|
1375
|
+
this.url = String(url).replace(/(?<!\/)\/+$/, "");
|
|
1376
1376
|
this.collection = collection;
|
|
1377
1377
|
this.dimensions = dimensions;
|
|
1378
1378
|
this.createCollection = createCollection;
|
|
@@ -2155,9 +2155,10 @@ var require_pinecone_retriever = __commonJS({
|
|
|
2155
2155
|
* @returns {Promise<Array<{ id: string, score: number, content: string, metadata: Object }>>}
|
|
2156
2156
|
*/
|
|
2157
2157
|
async retrieve(request, k = 10) {
|
|
2158
|
-
let input
|
|
2158
|
+
let input;
|
|
2159
2159
|
if (Array.isArray(request)) input = { queryVector: request };
|
|
2160
2160
|
else if (typeof request === "string") input = { query: request };
|
|
2161
|
+
else input = request || {};
|
|
2161
2162
|
const { query, queryVector, topK = k, signal } = input;
|
|
2162
2163
|
if (!Number.isInteger(topK) || topK < 1) {
|
|
2163
2164
|
throw new Error(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devilsdev/rag-connectors",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "Embedders, LLMs and vector stores for @devilsdev/rag-core: OpenAI, Anthropic, Cohere, Ollama, the AI SDK, Qdrant, pgvector, Pinecone and Weaviate.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rag",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@devilsdev/rag-core": "3.
|
|
48
|
+
"@devilsdev/rag-core": "3.8.0",
|
|
49
49
|
"axios": "^1.21.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|