Skip to content

Commit

Permalink
models error fixed (#1308)
Browse files Browse the repository at this point in the history
  • Loading branch information
namansleeps committed Oct 4, 2023
1 parent 9720c65 commit f8d6084
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions gui/pages/Content/Models/ModelForm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useEffect, useRef, useState} from "react";
import {removeTab, openNewTab, createInternalId, modelGetAuth, getUserClick} from "@/utils/utils";
import {removeTab, openNewTab, createInternalId, getUserClick} from "@/utils/utils";
import Image from "next/image";
import {fetchApiKey, storeModel, verifyEndPoint} from "@/pages/api/DashboardService";
import {BeatLoader, ClipLoader} from "react-spinners";
Expand Down Expand Up @@ -66,11 +66,9 @@ export default function ModelForm({internalId, getModels, sendModelData}){
{
const modelProviderId = response.data[0].id
verifyEndPoint(response.data[0].api_key, modelEndpoint, selectedModel).then((response) =>{
if(response.data.success) {
if(response.data.success)
storeModelDetails(modelProviderId)
getUserClick("Model Added Successfully",{'type': selectedModel})
}
else {
else{
toast.error("The Endpoint is not Valid",{autoClose: 1800});
setIsLoading(false);
}
Expand Down

0 comments on commit f8d6084

Please sign in to comment.