
jbilcke-hf
HF staff
the dynamic import is causing issue during build, but it's not an issue we can just put the var init inside the function
6463491
"use server" | |
import { LLMEngine } from "@/types" | |
import { predict as predictWithHuggingFace } from "./predictWithHuggingFace" | |
import { predict as predictWithOpenAI } from "./predictWithOpenAI" | |
const llmEngine = `${process.env.LLM_ENGINE || ""}` as LLMEngine | |
export const predict = llmEngine === "OPENAI" ? predictWithOpenAI : predictWithHuggingFace |