vectorvault
Advanced tools
Comparing version 1.1.4 to 1.1.5
63
index.js
@@ -131,2 +131,63 @@ export default class VectorVault { | ||
downloadToJson(params) { | ||
// itemIds must be a list of integers | ||
const url = "https://api.vectorvault.io/download_to_json"; | ||
const data = { | ||
user: this.user, | ||
api_key: this.apiKey, | ||
vault: this.vault, | ||
return_meta: false, | ||
...params | ||
}; | ||
// Send the POST request | ||
return fetch(url, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
body: JSON.stringify(data) | ||
}) | ||
.then(response => { | ||
if (response.ok) { | ||
return response.json(); | ||
} else { | ||
return response.json().then(json => { | ||
throw new Error("Failed: " + JSON.stringify(json)); | ||
}); | ||
} | ||
}); | ||
} | ||
uploadFromJson(json) { | ||
// itemIds must be a list of integers | ||
const url = "https://api.vectorvault.io/upload_from_json"; | ||
const data = { | ||
user: this.user, | ||
api_key: this.apiKey, | ||
vault: this.vault, | ||
json: json | ||
}; | ||
// Send the POST request | ||
return fetch(url, { | ||
method: 'POST', | ||
headers: { | ||
'Content-Type': 'application/json' | ||
}, | ||
body: JSON.stringify(data) | ||
}) | ||
.then(response => { | ||
if (response.ok) { | ||
return response.json(); | ||
} else { | ||
return response.json().then(json => { | ||
throw new Error("Failed: " + JSON.stringify(json)); | ||
}); | ||
} | ||
}); | ||
} | ||
editItem(itemId, newText) { | ||
@@ -209,3 +270,3 @@ const url = "https://api.vectorvault.io/edit_item"; | ||
// (i.e. [1, 2, 3, 4, 5, 6]) | ||
const url = "https://api.vectorvault.io/delete_items"; | ||
@@ -212,0 +273,0 @@ |
{ | ||
"name": "vectorvault", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "VectorVault API - JavaScript Client: Streamline your front-end development with the powerful combination of OpenAI's API and VectorVault's Cloud Vector Database. This JavaScript client provides seamless integration for building advanced RAG (Retrieve and Generate) applications. Whether you're working with JavaScript, HTML, or other web technologies, our API simplifies the process of fetching RAG responses through API POST requests. This package is the key to unlocking quick and efficient development for AI-powered web applications, ensuring a secure and robust connection to the VectorVault ecosystem. Start crafting exceptional RAG apps with minimal effort and maximum efficiency.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35544
739
19