mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-25 08:56:13 +01:00
Automatic category from expense title (#80)
* environment variable * random category draft * get category from ai * input limit and documentation * use watch * use field.name * prettier * presigned upload, readme warning, category to string util * prettier * check whether feature is enabled * use process.env * improved prompt to return id only * remove console.debug * show loader * share class name * prettier * use template literals * rename format util * prettier
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Category } from '@prisma/client'
|
||||
import { clsx, type ClassValue } from 'clsx'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
|
||||
@@ -15,3 +16,7 @@ export function formatExpenseDate(date: Date) {
|
||||
timeZone: 'UTC',
|
||||
})
|
||||
}
|
||||
|
||||
export function formatCategoryForAIPrompt(category: Category) {
|
||||
return `"${category.grouping}/${category.name}" (ID: ${category.id})`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user