mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
chore: organize ts types, fix eslint errors
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use server"
|
||||
|
||||
import { ActionState } from "@/lib/actions"
|
||||
import OpenAI from "openai"
|
||||
import { AnalyzeAttachment } from "./attachments"
|
||||
|
||||
@@ -8,7 +9,7 @@ export async function analyzeTransaction(
|
||||
schema: Record<string, unknown>,
|
||||
attachments: AnalyzeAttachment[],
|
||||
apiKey: string
|
||||
): Promise<{ success: boolean; data?: Record<string, any>; error?: string }> {
|
||||
): Promise<ActionState<Record<string, string>>> {
|
||||
const openai = new OpenAI({
|
||||
apiKey,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user