jbilcke-hf's picture
jbilcke-hf HF Staff
Add experimental support for Claude
e015622
raw
history blame contribute delete
587 Bytes
"use server"
import { LLMEngine } from "@/types"
import { predict as predictWithHuggingFace } from "./predictWithHuggingFace"
import { predict as predictWithOpenAI } from "./predictWithOpenAI"
import { predict as predictWithGroq } from "./predictWithGroq"
import { predict as predictWithAnthropic } from "./predictWithAnthropic"
const llmEngine = `${process.env.LLM_ENGINE || ""}` as LLMEngine
export const predict =
llmEngine === "GROQ" ? predictWithGroq :
llmEngine === "ANTHROPIC" ? predictWithAnthropic :
llmEngine === "OPENAI" ? predictWithOpenAI :
predictWithHuggingFace