import System from "@/models/system";
import { useState, useEffect } from "react";
export default function PerplexityOptions({ settings }) {
return (
{!settings?.credentialsOnly && (
)}
);
}
function PerplexityModelSelection({ settings }) {
const [customModels, setCustomModels] = useState([]);
const [loading, setLoading] = useState(true);
useEffect(() => {
async function findCustomModels() {
setLoading(true);
const { models } = await System.customModels("perplexity");
setCustomModels(models || []);
setLoading(false);
}
findCustomModels();
}, []);
if (loading || customModels.length == 0) {
return (
);
}
return (
);
}