chatgpt-plugin/models/chaite/vector_database.js
2025-03-05 23:56:41 +08:00

36 lines
509 B
JavaScript

// todo
class FaissVectorDatabase {
constructor (index) {
this.index = index
}
async addVector (vector, text) {
}
async addVectors (vectors, texts) {
}
async search (queryVector, k) {
}
async getVector (id) {
}
async deleteVector (id) {
}
async updateVector (id, newVector, newText) {
}
async count () {
}
async clear () {
}
}
/**
* 默认向量库
* @type {import('chaite').VectorDatabase}
*/
export const ChatGPTVectorDatabase = new FaissVectorDatabase()