Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite_vss issue #60

Merged
merged 5 commits into from
Oct 28, 2024
Merged

sqlite_vss issue #60

merged 5 commits into from
Oct 28, 2024

Conversation

MarcoMandar
Copy link
Collaborator

No description provided.

@sirkitree
Copy link
Collaborator

This would resolve #37

Review Q: should we just remove all of the *_vcc rather than commenting it out?

@sirkitree
Copy link
Collaborator

Thank you for this, I'll try to test on win32-x64

Also for future PR's, please consider reading https://github.com/ai16z/eliza/blob/main/CONTRIBUTING.md#pull-requests

@sirkitree
Copy link
Collaborator

Testing instructions:

  1. pull this branch locally
  2. run npm install to grab the new package
  3. run a character, ex: node --loader ts-node/esm src/index.ts --characters="characters/moriarty.character.json"

Note that the bot should start normally and give a new message: sqlite-vec extensions loaded successfully.

  1. test the memory by talking to your bot and telling it your name (Hi my name is sirkitree.)
  2. then ask it in the next message what your name is (what is my name?)

If this what's expected, then I think this is good to merge. I have it running on my window machine without WSL.

As stated before though, I think we should probably remove the _vcc stuff that's commented out to keep the code cleaner before merging.

@sirkitree
Copy link
Collaborator

sirkitree commented Oct 28, 2024

testing this further through discord I recieved the followign error:

Error handling message: SqliteError: no such function: vss_distance_l2
    at Database.prepare (C:\Users\sirki\repos\eliza\node_modules\better-sqlite3\lib\methods\wrappers.js:5:21)
    at SqliteDatabaseAdapter.searchMemoriesByEmbedding (file:///C:/Users/sirki/repos/eliza/src/adapters/sqlite.ts:200:34)
    at SqliteDatabaseAdapter.createMemory (file:///C:/Users/sirki/repos/eliza/src/adapters/sqlite.ts:135:48)
    at MemoryManager.createMemory (file:///C:/Users/sirki/repos/eliza/src/core/memory.ts:110:44)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MessageManager.handleMessage (file:///C:/Users/sirki/repos/eliza/src/clients/discord/messages.ts:143:17) {
  code: 'SQLITE_ERROR'
}

Signed-off-by: MarcoMandar <malicemandar@gmail.com>
@MarcoMandar
Copy link
Collaborator Author

testing this further through discord I recieved the followign error:

Error handling message: SqliteError: no such function: vss_distance_l2
    at Database.prepare (C:\Users\sirki\repos\eliza\node_modules\better-sqlite3\lib\methods\wrappers.js:5:21)
    at SqliteDatabaseAdapter.searchMemoriesByEmbedding (file:///C:/Users/sirki/repos/eliza/src/adapters/sqlite.ts:200:34)
    at SqliteDatabaseAdapter.createMemory (file:///C:/Users/sirki/repos/eliza/src/adapters/sqlite.ts:135:48)
    at MemoryManager.createMemory (file:///C:/Users/sirki/repos/eliza/src/core/memory.ts:110:44)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MessageManager.handleMessage (file:///C:/Users/sirki/repos/eliza/src/clients/discord/messages.ts:143:17) {
  code: 'SQLITE_ERROR'
}

can you check if it is working now?

@sirkitree
Copy link
Collaborator

yes that seems to have fixed the issue for me :)

@lalalune
Copy link
Member

I can't test this because I don't have a windows machine, @sirkitree if it works, please merge it

@sirkitree sirkitree merged commit 9a456bb into ai16z:main Oct 28, 2024
sirkitree added a commit that referenced this pull request Oct 28, 2024
sirkitree added a commit that referenced this pull request Oct 28, 2024
@sirkitree
Copy link
Collaborator

Thanks for this @MarcoMandar ! Now we have windows compatibility :)

I did a quick follow-up commit to remove some of the code you commented out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants