mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 21:37:11 +00:00
feat: init v3
This commit is contained in:
parent
d6cb085c40
commit
531986b2dc
284 changed files with 618 additions and 405179 deletions
36
models/chaite/vector_database.js
Normal file
36
models/chaite/vector_database.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
// 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue