anomaly / gallagher

The missing toolkit for extending Gallagher Command Centre, featuring a CLI, SQL interface, TUI and a Python idiomatic SDK
https://anomaly.github.io/gallagher/
MIT License
11 stars 2 forks source link

LLM integration to search for visits and other events #27

Open devraj opened 7 months ago

devraj commented 7 months ago

OpenAI has an official Python library and would lead to some interesting integrations if we can index the synchroised database to be indexed and the user can pose questions like:

Dev Mukherjee's last visit to the pool

or event reporting such as:

How many times does Dev Mukherjee goto the pool a month

Design

The first portion of this would be to analyse how the OpenAI platform works from an API standpoint and if it's useful to present this as part of the cli and tui interfaces.

Note that the API key will have to be vendored in by the user of the tool, but this is ok as the interfaces are designed for an advanced user.

Once we are comfortable with what the OpenAI API does, then we can expand on the specific requirements of this ticket.

Technical considerations

Not that this should make a difference but @openai use rye as the package management tool for the Python package.

See ticket where we are moving to hatch

devraj commented 6 months ago

Explore the possibility of using a local LLM to ensure the library and utility is decoupled from a commercial service.

Rationale: what we are trying to do is not that difficult in terms of language models and could without depending on a third party service.