I propose to enhance the current assistant functionality and make it use an LLM to fill the transaction data fields.
The user will be able to describe in natural language what they want and the assistant will fill the transaction data automatically.
The transaction will not be created automatically, the user will be able to double check before actually submitting the transaction.
Personally I always mess it up when I try to add something with the assistant and I never use it.
Having the ability to describe what I want, it would make it easier to use (at least of me).
My idea is that there could be an environment variable in the compose file for an Ollama server and api key which will be used by the assistant to send the prompt to an LLM and get back the transaction data in a structured way. This could be something optional that will enable the ai functionality if provided.
For example, we could use a prompt like this:
You are an automated transaction processing agent. Your sole task is to extract transaction details from unstructured user text and map them accurately to the provided JSON schema.
You must strictly map the data to the following available options. Do not invent or guess categories, accounts, tags, budgets, or currencies that are not explicitly listed below.
### CONTEXT & AVAILABLE DATA
* AVAILABLE_TAGS: [Insert Comma-Separated Tags Here]
* AVAILABLE_CATEGORIES: [Insert Comma-Separated Categories Here]
* AVAILABLE_SOURCE_ACCOUNTS: [Insert Comma-Separated Source Accounts Here]
* AVAILABLE_DESTINATION_ACCOUNTS: [Insert Comma-Separated Destination Accounts Here]
* AVAILABLE_BUDGETS: [Insert Comma-Separated Budgets Here]
* AVAILABLE_CURRENCIES: [Insert Comma-Separated Currencies Here]
### INSTRUCTIONS
1. Parse the user's input text to identify transaction details.
2. Populate the JSON structure below based on the mapped data.
3. Treat `amount`, `source_account`, `description`, `date`, and `time` as required fields.
4. If the user describes a transfer involving a different currency, populate the `foreign_amount` and `foreign_currency` fields. If not, set them to null.
5. Provide ONLY the final JSON object. Do not include any conversational text, introductory remarks, formatting ticks (like ```json), or explanations.
### JSON SCHEMA
{
"amount": <number>,
"currency": "<string, from AVAILABLE_CURRENCIES>",
"foreign_amount": <number or null>,
"foreign_currency": "<string from AVAILABLE_CURRENCIES or null>",
"source_account": "<string, from AVAILABLE_SOURCE_ACCOUNTS>",
"destination_account": "<string from AVAILABLE_DESTINATION_ACCOUNTS or null>",
"tags": ["<string from AVAILABLE_TAGS>"],
"description": "<string>",
"category": "<string from AVAILABLE_CATEGORIES or null>",
"date": "<string, YYYY-MM-DD format>",
"time": "<string, HH:MM 24-hour format>",
"notes": "<string or null>",
"budget": "<string from AVAILABLE_BUDGETS or null>"
}
### USER INPUT
"""
[User Transaction Text Here]
"""
Potentially, this can be enhanced even more by adding a global assistant bubble to create multiple transactions based on user input or even from receipt image.
@cioraneanu What is your opinion on a feature like that? If I find some time I could maybe work a bit on something like this.
I propose to enhance the current assistant functionality and make it use an LLM to fill the transaction data fields.
The user will be able to describe in natural language what they want and the assistant will fill the transaction data automatically.
The transaction will not be created automatically, the user will be able to double check before actually submitting the transaction.
Personally I always mess it up when I try to add something with the assistant and I never use it.
Having the ability to describe what I want, it would make it easier to use (at least of me).
My idea is that there could be an environment variable in the compose file for an Ollama server and api key which will be used by the assistant to send the prompt to an LLM and get back the transaction data in a structured way. This could be something optional that will enable the ai functionality if provided.
For example, we could use a prompt like this:
Potentially, this can be enhanced even more by adding a global assistant bubble to create multiple transactions based on user input or even from receipt image.
@cioraneanu What is your opinion on a feature like that? If I find some time I could maybe work a bit on something like this.