ericmjl / llamabot

Pythonic class-based interface to LLMs
https://ericmjl.github.io/llamabot/
121 stars 22 forks source link

Llamabot Zotero CLI with local db ? #45

Closed gse-cc-git closed 7 months ago

gse-cc-git commented 8 months ago

Is the Llambot configurable to work with local Zotero database ?

From the tutorial I kinda understand that it requires a Zotero account

First, we need to configure the Llamabot Zotero CLI environment variables. This is done using the configure command. You will be prompted to enter your Zotero library ID, API key, and library type.

Am I right ?

If the interaction with local database is possible would you please provide some pointers to do so ? Thanks a lot

ericmjl commented 7 months ago

Hi @gse-cc-git! Thanks for raising the question.

LlamaBot's Zotero chat does require a Zotero account, which is free, as far as I can tell. The reason we need this is because the package uses pyzotero (https://github.com/urschrei/pyzotero), which is specifically designed to interact with the Zotero API rather than a local database.

I'm personally not aware of how to use Python to interact with the Zotero database. The only way I can imagine how to accomplish this is by parsing the filesystem for PDFs (Path(zotero_dir).rglob("*.pdf")), but I'm not quite sure how to get the rest of the metadata (could be sqlite?). On the other hand, pyzotero makes things a lot easier.

ericmjl commented 7 months ago

@gse-cc-git I am going to close the issue for the time being. However, if you feel the need to, please feel free to re-open at any time!