Spaces:
Runtime error
Runtime error
File size: 587 Bytes
624088c 287a603 6463491 a2c0551 e015622 3ca0269 287a603 a2c0551 e015622 a2c0551 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
"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 |