patch warning
This commit is contained in:
parent
866e9efbf8
commit
fdf5cd0d5f
@ -38,7 +38,7 @@ function SambaNovaModelSelection({ settings, apiKey }) {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function findCustomModels() {
|
async function findCustomModels() {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const { models } = await System.customModels("sambanova");
|
const { models } = await System.customModels("sambanova", apiKey);
|
||||||
if (models?.length > 0) {
|
if (models?.length > 0) {
|
||||||
const modelsByOrganization = models.reduce((acc, model) => {
|
const modelsByOrganization = models.reduce((acc, model) => {
|
||||||
acc[model.organization] = acc[model.organization] || [];
|
acc[model.organization] = acc[model.organization] || [];
|
||||||
@ -51,7 +51,7 @@ function SambaNovaModelSelection({ settings, apiKey }) {
|
|||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
findCustomModels();
|
findCustomModels();
|
||||||
}, []);
|
}, [apiKey]);
|
||||||
|
|
||||||
if (loading || Object.keys(groupedModels).length === 0) {
|
if (loading || Object.keys(groupedModels).length === 0) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user