Closed edoardob90 closed 1 year ago
The mechanism of allowing users is based on a manually edited list of Telegram user IDs added to config.toml
. Later, there will be a menu in /settings
to allow each user to log in with a secret question.
Linked to #16
With OpenAI models that support function calling, we can add a "natural language mode" to add new records. This would really be a great new feature for the bot 🤖
A schematic flow is the following:
/record
menu, they can either use the category buttons as usual, or enter a prompt like Paid the bill: 30 euros, electricity, credit card.function_call
attribute with the function's name and arguments. The arguments represent the new record. We must keep track of that we're using a LLM to perform the record parsing. We store the resulting record as-is, a JSON stringstore()
function (or a variant): the record is loaded and validated through theRecordSchema
. If it's valid, then it's added to the user data storage, as usualThis depends on the changes made in #7 and #11 because we need the classes
Record
andRecordSchema
.Important additions to make
openai
module to hold all the methods related to the API calls