mirror of
https://github.com/Sosokker/chefhai.git
synced 2025-12-19 14:04:08 +01:00
10 lines
348 B
TypeScript
10 lines
348 B
TypeScript
import { GenAIResult } from '../types';
|
|
import { supabase } from './supabase';
|
|
|
|
export async function callGenAIonImage(imageUrl: string): Promise<{ data: GenAIResult | null; error: Error | null }> {
|
|
const { data, error } = await supabase.functions.invoke('gemini-food-analyze', {
|
|
body: { imageUrl: imageUrl },
|
|
})
|
|
|
|
return { data, error }
|
|
} |